Bug 1524688: Part 47 - Convert RecordingCmdLine to static registration. r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D18457

--HG--
rename : layout/tools/recording/recording-cmdline.js => layout/tools/recording/RecordingCmdLine.jsm
extra : rebase_source : c4604e45af999aa358876c80367265056148b984
This commit is contained in:
Kris Maglione 2019-01-30 11:17:02 -08:00
Родитель 0acda0c01f
Коммит 516a4c8239
5 изменённых файлов: 23 добавлений и 18 удалений

Просмотреть файл

@ -210,8 +210,6 @@
@RESPATH@/components/servicesComponents.manifest
@RESPATH@/components/servicesSettings.manifest
@RESPATH@/components/cryptoComponents.manifest
@RESPATH@/components/recording-cmdline.js
@RESPATH@/components/recording-cmdline.manifest
@RESPATH@/components/htmlMenuBuilder.js
@RESPATH@/components/htmlMenuBuilder.manifest

Просмотреть файл

@ -2,20 +2,12 @@
* 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/. */
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const nsISupports = Ci.nsISupports;
const nsICommandLine = Ci.nsICommandLine;
const nsICommandLineHandler = Ci.nsICommandLineHandler;
const nsISupportsString = Ci.nsISupportsString;
const nsIWindowWatcher = Ci.nsIWindowWatcher;
function RecordingCmdLineHandler() {}
RecordingCmdLineHandler.prototype =
{
classID: Components.ID('{86FB70EC-90FF-45AD-A1C1-F77D3C1184E9}'),
/* nsISupports */
QueryInterface: ChromeUtils.generateQI([nsICommandLineHandler]),
@ -71,4 +63,4 @@ RecordingCmdLineHandler.prototype =
" --recording-output <file> Specify destination file for a drawing recording.\n"
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RecordingCmdLineHandler]);
var EXPORTED_SYMBOLS = ["RecordingCmdLineHandler"];

Просмотреть файл

@ -0,0 +1,15 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
Classes = [
{
'cid': '{86FB70EC-90FF-45AD-A1C1-F77D3C1184E9}',
'contract_ids': ['@mozilla.org/commandlinehandler/general-startup;1?type=recording'],
'jsm': 'resource://gre/modules/RecordingCmdLine.jsm',
'constructor': 'RecordingCmdLineHandler',
'categories': {'command-line-handler': 'm-recording'},
},
]

Просмотреть файл

@ -4,9 +4,12 @@
# 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/.
EXTRA_COMPONENTS += [
'recording-cmdline.js',
'recording-cmdline.manifest',
EXTRA_JS_MODULES += [
'RecordingCmdLine.jsm',
]
JAR_MANIFESTS += ['jar.mn']
XPCOM_MANIFESTS += [
'components.conf',
]
JAR_MANIFESTS += ['jar.mn']

Просмотреть файл

@ -1,3 +0,0 @@
component {86FB70EC-90FF-45AD-A1C1-F77D3C1184E9} recording-cmdline.js
contract @mozilla.org/commandlinehandler/general-startup;1?type=recording {86FB70EC-90FF-45AD-A1C1-F77D3C1184E9}
category command-line-handler m-recording @mozilla.org/commandlinehandler/general-startup;1?type=recording