mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1491588 - Remove the XPCOM registration for nsCommandParams; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5959
This commit is contained in:
parent
79b7b4ad24
commit
743c23d1d0
@ -91,9 +91,3 @@ interface nsICommandParams : nsISupports
|
||||
%}
|
||||
};
|
||||
|
||||
// {f7fa4581-238e-11d5-a73c-ab64fb68f2bc}
|
||||
%{C++
|
||||
#define NS_COMMAND_PARAMS_CID { 0xf7fa4581, 0x238e, 0x11d5, { 0xa7, 0x3c, 0xab, 0x64, 0xfb, 0x68, 0xf2, 0xbc } }
|
||||
#define NS_COMMAND_PARAMS_CONTRACTID "@mozilla.org/embedcomp/command-params;1"
|
||||
%}
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
interface xpcIJSWeakReference;
|
||||
interface nsIClassInfo;
|
||||
interface nsICommandParams;
|
||||
interface nsIComponentManager;
|
||||
interface nsICycleCollectorListener;
|
||||
interface nsIEditorSpellCheck;
|
||||
@ -723,6 +724,9 @@ interface nsIXPCComponents_Utils : nsISupports
|
||||
|
||||
/* Create a commandline object. */
|
||||
nsISupports createCommandLine();
|
||||
|
||||
/* Create a command params object. */
|
||||
nsICommandParams createCommandParams();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/EditorSpellCheck.h"
|
||||
#include "nsCommandLine.h"
|
||||
#include "nsCommandParams.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace JS;
|
||||
@ -3231,6 +3232,15 @@ nsXPCComponents_Utils::CreateCommandLine(nsISupports** aCommandLine)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::CreateCommandParams(nsICommandParams** aCommandParams)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCommandParams);
|
||||
nsCOMPtr<nsICommandParams> commandParams = new nsCommandParams();
|
||||
commandParams.forget(aCommandParams);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
/***************************************************************************/
|
||||
/***************************************************************************/
|
||||
|
@ -19,8 +19,7 @@ class ControllersChild extends ActorChild {
|
||||
case "ControllerCommands:DoWithParams":
|
||||
var data = message.data;
|
||||
if (this.docShell.isCommandEnabled(data.cmd)) {
|
||||
var params = Cc["@mozilla.org/embedcomp/command-params;1"].
|
||||
createInstance(Ci.nsICommandParams);
|
||||
var params = Cu.createCommandParams();
|
||||
for (var name in data.params) {
|
||||
var value = data.params[name];
|
||||
if (value.type == "long") {
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "nsFind.h"
|
||||
#include "nsWebBrowserFind.h"
|
||||
#include "nsWebBrowserPersist.h"
|
||||
#include "nsCommandParams.h"
|
||||
#include "nsCommandGroup.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsEmbedCID.h"
|
||||
@ -26,7 +25,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserFind)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserPersist)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandParams)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandGroup)
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
@ -52,7 +50,6 @@ NS_DEFINE_NAMED_CID(NS_FIND_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WEBBROWSERPERSIST_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_COMMAND_PARAMS_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_CONTROLLER_COMMAND_GROUP_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
|
||||
@ -75,7 +72,6 @@ static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
|
||||
{ &kNS_WEB_BROWSER_FIND_CID, false, nullptr, nsWebBrowserFindConstructor },
|
||||
{ &kNS_APPSTARTUPNOTIFIER_CID, false, nullptr, nsAppStartupNotifierConstructor },
|
||||
{ &kNS_WEBBROWSERPERSIST_CID, false, nullptr, nsWebBrowserPersistConstructor },
|
||||
{ &kNS_COMMAND_PARAMS_CID, false, nullptr, nsCommandParamsConstructor },
|
||||
{ &kNS_CONTROLLER_COMMAND_GROUP_CID, false, nullptr, nsControllerCommandGroupConstructor },
|
||||
{ nullptr }
|
||||
};
|
||||
@ -92,7 +88,6 @@ static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
|
||||
{ NS_WEB_BROWSER_FIND_CONTRACTID, &kNS_WEB_BROWSER_FIND_CID },
|
||||
{ NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID },
|
||||
{ NS_WEBBROWSERPERSIST_CONTRACTID, &kNS_WEBBROWSERPERSIST_CID },
|
||||
{ NS_COMMAND_PARAMS_CONTRACTID, &kNS_COMMAND_PARAMS_CID },
|
||||
{ NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, &kNS_CONTROLLER_COMMAND_GROUP_CID },
|
||||
{ nullptr }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user