WebCore/generated/JSWorkerContext.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 JSWorkerContext_h
       
    22 #define JSWorkerContext_h
       
    23 
       
    24 #if ENABLE(WORKERS)
       
    25 
       
    26 #include "JSWorkerContextBase.h"
       
    27 #include <runtime/JSObjectWithGlobalObject.h>
       
    28 
       
    29 namespace WebCore {
       
    30 
       
    31 class WorkerContext;
       
    32 
       
    33 class JSWorkerContext : public JSWorkerContextBase {
       
    34     typedef JSWorkerContextBase Base;
       
    35 public:
       
    36     JSWorkerContext(NonNullPassRefPtr<JSC::Structure>, PassRefPtr<WorkerContext>);
       
    37     virtual ~JSWorkerContext();
       
    38     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
       
    39     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
       
    40     bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    41     bool getOwnPropertyDescriptorDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    42     virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
       
    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     virtual void markChildren(JSC::MarkStack&);
       
    52 
       
    53 
       
    54     // Custom attributes
       
    55     JSC::JSValue messageChannel(JSC::ExecState*) const;
       
    56     JSC::JSValue eventSource(JSC::ExecState*) const;
       
    57     JSC::JSValue xmlHttpRequest(JSC::ExecState*) const;
       
    58     JSC::JSValue webSocket(JSC::ExecState*) const;
       
    59 
       
    60     // Custom functions
       
    61     JSC::JSValue importScripts(JSC::ExecState*);
       
    62     JSC::JSValue openDatabase(JSC::ExecState*);
       
    63     JSC::JSValue openDatabaseSync(JSC::ExecState*);
       
    64     JSC::JSValue setTimeout(JSC::ExecState*);
       
    65     JSC::JSValue setInterval(JSC::ExecState*);
       
    66 protected:
       
    67     static const unsigned StructureFlags = JSC::OverridesMarkChildren | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    68 };
       
    69 
       
    70 
       
    71 class JSWorkerContextPrototype : public JSC::JSObjectWithGlobalObject {
       
    72     typedef JSC::JSObjectWithGlobalObject Base;
       
    73 public:
       
    74     void* operator new(size_t, JSC::JSGlobalData*);
       
    75     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    76     static const JSC::ClassInfo s_info;
       
    77     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    78     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    79     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    80     {
       
    81         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    82     }
       
    83     JSWorkerContextPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
       
    84 protected:
       
    85     static const unsigned StructureFlags = JSC::OverridesMarkChildren | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    86 };
       
    87 
       
    88 // Functions
       
    89 
       
    90 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClose(JSC::ExecState*);
       
    91 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionImportScripts(JSC::ExecState*);
       
    92 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionOpenDatabase(JSC::ExecState*);
       
    93 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionOpenDatabaseSync(JSC::ExecState*);
       
    94 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionSetTimeout(JSC::ExecState*);
       
    95 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearTimeout(JSC::ExecState*);
       
    96 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionSetInterval(JSC::ExecState*);
       
    97 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearInterval(JSC::ExecState*);
       
    98 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionAddEventListener(JSC::ExecState*);
       
    99 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionRemoveEventListener(JSC::ExecState*);
       
   100 JSC::EncodedJSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionDispatchEvent(JSC::ExecState*);
       
   101 // Attributes
       
   102 
       
   103 JSC::JSValue jsWorkerContextSelf(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   104 void setJSWorkerContextSelf(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   105 JSC::JSValue jsWorkerContextLocation(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   106 void setJSWorkerContextLocation(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   107 JSC::JSValue jsWorkerContextOnerror(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   108 void setJSWorkerContextOnerror(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   109 JSC::JSValue jsWorkerContextNavigator(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   110 void setJSWorkerContextNavigator(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   111 JSC::JSValue jsWorkerContextWebkitNotifications(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   112 JSC::JSValue jsWorkerContextMessageEventConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   113 void setJSWorkerContextMessageEventConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   114 JSC::JSValue jsWorkerContextWorkerLocationConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   115 void setJSWorkerContextWorkerLocationConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   116 JSC::JSValue jsWorkerContextMessageChannelConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   117 void setJSWorkerContextMessageChannelConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   118 JSC::JSValue jsWorkerContextEventSourceConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   119 void setJSWorkerContextEventSourceConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   120 JSC::JSValue jsWorkerContextXMLHttpRequestConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   121 void setJSWorkerContextXMLHttpRequestConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   122 JSC::JSValue jsWorkerContextWebSocketConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   123 void setJSWorkerContextWebSocketConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   124 
       
   125 } // namespace WebCore
       
   126 
       
   127 #endif // ENABLE(WORKERS)
       
   128 
       
   129 #endif