michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* vim:expandtab:shiftwidth=4:tabstop=4: michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "nsWidgetsCID.h" michael@0: #include "nsClipboardProxy.h" michael@0: #include "nsColorPickerProxy.h" michael@0: #include "nsFilePickerProxy.h" michael@0: michael@0: using namespace mozilla; michael@0: michael@0: #ifndef MOZ_B2G michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardProxy) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPickerProxy) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePickerProxy) michael@0: michael@0: NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID); michael@0: NS_DEFINE_NAMED_CID(NS_COLORPICKER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kWidgetCIDs[] = { michael@0: { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardProxyConstructor, michael@0: Module::CONTENT_PROCESS_ONLY }, michael@0: { &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerProxyConstructor, michael@0: Module::CONTENT_PROCESS_ONLY }, michael@0: { &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerProxyConstructor, michael@0: Module::CONTENT_PROCESS_ONLY }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { michael@0: { "@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID, Module::CONTENT_PROCESS_ONLY }, michael@0: { "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::CONTENT_PROCESS_ONLY }, michael@0: { "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID, Module::CONTENT_PROCESS_ONLY }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kWidgetModule = { michael@0: mozilla::Module::kVersion, michael@0: kWidgetCIDs, michael@0: kWidgetContracts michael@0: }; michael@0: michael@0: NSMODULE_DEFN(nsContentProcessWidgetModule) = &kWidgetModule; michael@0: michael@0: #endif /* MOZ_B2G */