diff -r 000000000000 -r 6474c204b198 toolkit/devtools/gcli/commands/media.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolkit/devtools/gcli/commands/media.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,47 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +const gcli = require("gcli/index"); + +exports.items = [ + { + name: "media", + description: gcli.lookup("mediaDesc") + }, + { + name: "media emulate", + description: gcli.lookup("mediaEmulateDesc"), + manual: gcli.lookup("mediaEmulateManual"), + params: [ + { + name: "type", + description: gcli.lookup("mediaEmulateType"), + type: { + name: "selection", + data: [ + "braille", "embossed", "handheld", "print", "projection", + "screen", "speech", "tty", "tv" + ] + } + } + ], + exec: function(args, context) { + let markupDocumentViewer = context.environment.chromeWindow + .gBrowser.markupDocumentViewer; + markupDocumentViewer.emulateMedium(args.type); + } + }, + { + name: "media reset", + description: gcli.lookup("mediaResetDesc"), + manual: gcli.lookup("mediaEmulateManual"), + exec: function(args, context) { + let markupDocumentViewer = context.environment.chromeWindow + .gBrowser.markupDocumentViewer; + markupDocumentViewer.stopEmulatingMedium(); + } + } +];