summaryrefslogtreecommitdiff
path: root/widget/nsContentProcessWidgetFactory.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /widget/nsContentProcessWidgetFactory.cpp
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloaduxp-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
Add m-esr52 at 52.6.0
Diffstat (limited to 'widget/nsContentProcessWidgetFactory.cpp')
-rw-r--r--widget/nsContentProcessWidgetFactory.cpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/widget/nsContentProcessWidgetFactory.cpp b/widget/nsContentProcessWidgetFactory.cpp
new file mode 100644
index 0000000000..f8eaee2506
--- /dev/null
+++ b/widget/nsContentProcessWidgetFactory.cpp
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
+/* 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/. */
+
+#include "mozilla/ModuleUtils.h"
+#include "nsWidgetsCID.h"
+#include "nsClipboardProxy.h"
+#include "nsColorPickerProxy.h"
+#include "nsDatePickerProxy.h"
+#include "nsDragServiceProxy.h"
+#include "nsFilePickerProxy.h"
+#include "nsScreenManagerProxy.h"
+#include "mozilla/widget/PuppetBidiKeyboard.h"
+
+using namespace mozilla;
+using namespace mozilla::widget;
+
+#ifndef MOZ_WIDGET_GONK
+
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardProxy)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPickerProxy)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsDatePickerProxy)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragServiceProxy)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePickerProxy)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerProxy)
+NS_GENERIC_FACTORY_CONSTRUCTOR(PuppetBidiKeyboard)
+
+NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID);
+NS_DEFINE_NAMED_CID(NS_COLORPICKER_CID);
+NS_DEFINE_NAMED_CID(NS_DATEPICKER_CID);
+NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID);
+NS_DEFINE_NAMED_CID(PUPPETBIDIKEYBOARD_CID);
+NS_DEFINE_NAMED_CID(NS_SCREENMANAGER_CID);
+
+static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
+ { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardProxyConstructor,
+ Module::CONTENT_PROCESS_ONLY },
+ { &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerProxyConstructor,
+ Module::CONTENT_PROCESS_ONLY },
+ { &kNS_DATEPICKER_CID, false, nullptr, nsDatePickerProxyConstructor,
+ Module::CONTENT_PROCESS_ONLY },
+ { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceProxyConstructor,
+ Module::CONTENT_PROCESS_ONLY },
+ { &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerProxyConstructor,
+ Module::CONTENT_PROCESS_ONLY },
+ { &kNS_SCREENMANAGER_CID, false, nullptr, nsScreenManagerProxyConstructor,
+ Module::CONTENT_PROCESS_ONLY },
+ { &kPUPPETBIDIKEYBOARD_CID, false, NULL, PuppetBidiKeyboardConstructor,
+ mozilla::Module::CONTENT_PROCESS_ONLY },
+ { nullptr }
+};
+
+static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
+ { "@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID, Module::CONTENT_PROCESS_ONLY },
+ { "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::CONTENT_PROCESS_ONLY },
+ { "@mozilla.org/datepicker;1", &kNS_DATEPICKER_CID, Module::CONTENT_PROCESS_ONLY },
+ { "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID, Module::CONTENT_PROCESS_ONLY },
+ { "@mozilla.org/gfx/screenmanager;1", &kNS_SCREENMANAGER_CID, Module::CONTENT_PROCESS_ONLY },
+ { "@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID, Module::CONTENT_PROCESS_ONLY },
+ { "@mozilla.org/widget/bidikeyboard;1", &kPUPPETBIDIKEYBOARD_CID,
+ Module::CONTENT_PROCESS_ONLY },
+ { nullptr }
+};
+
+static const mozilla::Module kWidgetModule = {
+ mozilla::Module::kVersion,
+ kWidgetCIDs,
+ kWidgetContracts
+};
+
+NSMODULE_DEFN(nsContentProcessWidgetModule) = &kWidgetModule;
+
+#endif /* MOZ_WIDGET_GONK */