WebCore/generated/JSInjectedScriptHost.h
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2     This file is part of the WebKit open source project.
       
     3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Library General Public
       
     7     License as published by the Free Software Foundation; either
       
     8     version 2 of the License, or (at your option) any later version.
       
     9 
       
    10     This library is distributed in the hope that it will be useful,
       
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13     Library General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Library General Public License
       
    16     along with this library; see the file COPYING.LIB.  If not, write to
       
    17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    18     Boston, MA 02110-1301, USA.
       
    19 */
       
    20 
       
    21 #ifndef JSInjectedScriptHost_h
       
    22 #define JSInjectedScriptHost_h
       
    23 
       
    24 #if ENABLE(INSPECTOR)
       
    25 
       
    26 #include "JSDOMBinding.h"
       
    27 #include <runtime/JSGlobalObject.h>
       
    28 #include <runtime/JSObjectWithGlobalObject.h>
       
    29 #include <runtime/ObjectPrototype.h>
       
    30 
       
    31 namespace WebCore {
       
    32 
       
    33 class InjectedScriptHost;
       
    34 
       
    35 class JSInjectedScriptHost : public DOMObjectWithGlobalPointer {
       
    36     typedef DOMObjectWithGlobalPointer Base;
       
    37 public:
       
    38     JSInjectedScriptHost(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<InjectedScriptHost>);
       
    39     virtual ~JSInjectedScriptHost();
       
    40     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
       
    41     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
       
    42     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
       
    43     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    44     static const JSC::ClassInfo s_info;
       
    45 
       
    46     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    47     {
       
    48         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    49     }
       
    50 
       
    51     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
       
    52 
       
    53     // Custom functions
       
    54     JSC::JSValue nodeForId(JSC::ExecState*);
       
    55     JSC::JSValue pushNodePathToFrontend(JSC::ExecState*);
       
    56     JSC::JSValue currentCallFrame(JSC::ExecState*);
       
    57     JSC::JSValue databaseForId(JSC::ExecState*);
       
    58     JSC::JSValue selectDatabase(JSC::ExecState*);
       
    59     JSC::JSValue selectDOMStorage(JSC::ExecState*);
       
    60     JSC::JSValue reportDidDispatchOnInjectedScript(JSC::ExecState*);
       
    61     InjectedScriptHost* impl() const { return m_impl.get(); }
       
    62 
       
    63 private:
       
    64     RefPtr<InjectedScriptHost> m_impl;
       
    65 protected:
       
    66     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    67 };
       
    68 
       
    69 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, InjectedScriptHost*);
       
    70 InjectedScriptHost* toInjectedScriptHost(JSC::JSValue);
       
    71 
       
    72 class JSInjectedScriptHostPrototype : public JSC::JSObjectWithGlobalObject {
       
    73     typedef JSC::JSObjectWithGlobalObject Base;
       
    74 public:
       
    75     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
       
    76     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    77     static const JSC::ClassInfo s_info;
       
    78     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    79     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    80     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    81     {
       
    82         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    83     }
       
    84     JSInjectedScriptHostPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
       
    85 protected:
       
    86     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    87 };
       
    88 
       
    89 // Functions
       
    90 
       
    91 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionClearConsoleMessages(JSC::ExecState*);
       
    92 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionCopyText(JSC::ExecState*);
       
    93 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionNodeForId(JSC::ExecState*);
       
    94 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionPushNodePathToFrontend(JSC::ExecState*);
       
    95 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionInspectedNode(JSC::ExecState*);
       
    96 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionCurrentCallFrame(JSC::ExecState*);
       
    97 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionDatabaseForId(JSC::ExecState*);
       
    98 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionSelectDatabase(JSC::ExecState*);
       
    99 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionSelectDOMStorage(JSC::ExecState*);
       
   100 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionDidCreateWorker(JSC::ExecState*);
       
   101 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionDidDestroyWorker(JSC::ExecState*);
       
   102 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionNextWorkerId(JSC::ExecState*);
       
   103 JSC::EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionReportDidDispatchOnInjectedScript(JSC::ExecState*);
       
   104 // Attributes
       
   105 
       
   106 JSC::JSValue jsInjectedScriptHostConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   107 
       
   108 } // namespace WebCore
       
   109 
       
   110 #endif // ENABLE(INSPECTOR)
       
   111 
       
   112 #endif