widget/xpwidgets/nsContentProcessWidgetFactory.cpp

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial