1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/devtools/gcli/commands/media.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +"use strict"; 1.9 + 1.10 +const gcli = require("gcli/index"); 1.11 + 1.12 +exports.items = [ 1.13 + { 1.14 + name: "media", 1.15 + description: gcli.lookup("mediaDesc") 1.16 + }, 1.17 + { 1.18 + name: "media emulate", 1.19 + description: gcli.lookup("mediaEmulateDesc"), 1.20 + manual: gcli.lookup("mediaEmulateManual"), 1.21 + params: [ 1.22 + { 1.23 + name: "type", 1.24 + description: gcli.lookup("mediaEmulateType"), 1.25 + type: { 1.26 + name: "selection", 1.27 + data: [ 1.28 + "braille", "embossed", "handheld", "print", "projection", 1.29 + "screen", "speech", "tty", "tv" 1.30 + ] 1.31 + } 1.32 + } 1.33 + ], 1.34 + exec: function(args, context) { 1.35 + let markupDocumentViewer = context.environment.chromeWindow 1.36 + .gBrowser.markupDocumentViewer; 1.37 + markupDocumentViewer.emulateMedium(args.type); 1.38 + } 1.39 + }, 1.40 + { 1.41 + name: "media reset", 1.42 + description: gcli.lookup("mediaResetDesc"), 1.43 + manual: gcli.lookup("mediaEmulateManual"), 1.44 + exec: function(args, context) { 1.45 + let markupDocumentViewer = context.environment.chromeWindow 1.46 + .gBrowser.markupDocumentViewer; 1.47 + markupDocumentViewer.stopEmulatingMedium(); 1.48 + } 1.49 + } 1.50 +];