widget/xpwidgets/nsContentProcessWidgetFactory.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* vim:expandtab:shiftwidth=4:tabstop=4:
michael@0 3 */
michael@0 4 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 7
michael@0 8 #include "mozilla/ModuleUtils.h"
michael@0 9 #include "nsWidgetsCID.h"
michael@0 10 #include "nsClipboardProxy.h"
michael@0 11 #include "nsColorPickerProxy.h"
michael@0 12 #include "nsFilePickerProxy.h"
michael@0 13
michael@0 14 using namespace mozilla;
michael@0 15
michael@0 16 #ifndef MOZ_B2G
michael@0 17
michael@0 18 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardProxy)
michael@0 19 NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPickerProxy)
michael@0 20 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePickerProxy)
michael@0 21
michael@0 22 NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID);
michael@0 23 NS_DEFINE_NAMED_CID(NS_COLORPICKER_CID);
michael@0 24 NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID);
michael@0 25
michael@0 26 static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
michael@0 27 { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardProxyConstructor,
michael@0 28 Module::CONTENT_PROCESS_ONLY },
michael@0 29 { &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerProxyConstructor,
michael@0 30 Module::CONTENT_PROCESS_ONLY },
michael@0 31 { &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerProxyConstructor,
michael@0 32 Module::CONTENT_PROCESS_ONLY },
michael@0 33 { nullptr }
michael@0 34 };
michael@0 35
michael@0 36 static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
michael@0 37 { "@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID, Module::CONTENT_PROCESS_ONLY },
michael@0 38 { "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::CONTENT_PROCESS_ONLY },
michael@0 39 { "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID, Module::CONTENT_PROCESS_ONLY },
michael@0 40 { nullptr }
michael@0 41 };
michael@0 42
michael@0 43 static const mozilla::Module kWidgetModule = {
michael@0 44 mozilla::Module::kVersion,
michael@0 45 kWidgetCIDs,
michael@0 46 kWidgetContracts
michael@0 47 };
michael@0 48
michael@0 49 NSMODULE_DEFN(nsContentProcessWidgetModule) = &kWidgetModule;
michael@0 50
michael@0 51 #endif /* MOZ_B2G */

mercurial