dom/base/nsIDOMScriptObjectFactory.h

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.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsIDOMScriptObjectFactory_h__
     7 #define nsIDOMScriptObjectFactory_h__
     9 #include "nsISupports.h"
    10 #include "nsIDOMClassInfo.h"
    11 #include "nsString.h"
    13 #define NS_IDOM_SCRIPT_OBJECT_FACTORY_IID \
    14 { 0x2a50e17c, 0x46ff, 0x4150, \
    15   { 0xbb, 0x46, 0xd8, 0x07, 0xb3, 0x36, 0xde, 0xab } }
    17 class nsIScriptContext;
    18 class nsIScriptGlobalObject;
    19 class nsIDOMEventListener;
    21 typedef nsXPCClassInfo* (*nsDOMClassInfoExternalConstructorFnc)
    22   (const char* aName);
    24 class nsIDOMScriptObjectFactory : public nsISupports {
    25 public:  
    26   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOM_SCRIPT_OBJECT_FACTORY_IID)
    28   NS_IMETHOD_(nsISupports *) GetClassInfoInstance(nsDOMClassInfoID aID) = 0;
    29   NS_IMETHOD_(nsISupports *) GetExternalClassInfoInstance(const nsAString& aName) = 0;
    31   // Register the info for an external class. aName must be static
    32   // data, it will not be deleted by the DOM code. aProtoChainInterface
    33   // must be registered in the JAVASCRIPT_DOM_INTERFACE category, or
    34   // prototypes for this class won't work (except if the interface
    35   // name starts with nsIDOM).
    36   NS_IMETHOD RegisterDOMClassInfo(const char *aName,
    37                                   nsDOMClassInfoExternalConstructorFnc aConstructorFptr,
    38                                   const nsIID *aProtoChainInterface,
    39                                   const nsIID **aInterfaces,
    40                                   uint32_t aScriptableFlags,
    41                                   bool aHasClassInterface,
    42                                   const nsCID *aConstructorCID) = 0;
    43 };
    45 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMScriptObjectFactory,
    46                               NS_IDOM_SCRIPT_OBJECT_FACTORY_IID)
    48 #endif /* nsIDOMScriptObjectFactory_h__ */

mercurial