tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSConsole.h
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 JSConsole_h
22 #define JSConsole_h
23
24 #include "Console.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
29
30 namespace WebCore {
31
32 class JSConsole : public JSDOMWrapper {
33 public:
34     typedef JSDOMWrapper Base;
35     static JSConsole* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Console> impl)
36     {
37         JSConsole* ptr = new (JSC::allocateCell<JSConsole>(globalObject->globalData().heap)) JSConsole(structure, globalObject, impl);
38         ptr->finishCreation(globalObject->globalData());
39         return ptr;
40     }
41
42     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45     static const JSC::ClassInfo s_info;
46
47     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
48     {
49         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
50     }
51
52
53     // Custom attributes
54     JSC::JSValue profiles(JSC::ExecState*) const;
55
56     // Custom functions
57     JSC::JSValue profile(JSC::ExecState*);
58     JSC::JSValue profileEnd(JSC::ExecState*);
59     Console* impl() const { return m_impl; }
60     void releaseImpl() { m_impl->deref(); m_impl = 0; }
61
62 private:
63     Console* m_impl;
64 protected:
65     JSConsole(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Console>);
66     void finishCreation(JSC::JSGlobalData&);
67     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
68 };
69
70 class JSConsoleOwner : public JSC::WeakHandleOwner {
71     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
72     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
73 };
74
75 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, Console*)
76 {
77     DEFINE_STATIC_LOCAL(JSConsoleOwner, jsConsoleOwner, ());
78     return &jsConsoleOwner;
79 }
80
81 inline void* wrapperContext(DOMWrapperWorld* world, Console*)
82 {
83     return world;
84 }
85
86 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Console*);
87 Console* toConsole(JSC::JSValue);
88
89 class JSConsolePrototype : public JSC::JSNonFinalObject {
90 public:
91     typedef JSC::JSNonFinalObject Base;
92     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
93     static JSConsolePrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
94     {
95         JSConsolePrototype* ptr = new (JSC::allocateCell<JSConsolePrototype>(globalData.heap)) JSConsolePrototype(globalData, globalObject, structure);
96         ptr->finishCreation(globalData);
97         return ptr;
98     }
99
100     static const JSC::ClassInfo s_info;
101     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
102     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
103     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
104     {
105         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
106     }
107
108 private:
109     JSConsolePrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
110 protected:
111     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
112 };
113
114 // Functions
115
116 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionDebug(JSC::ExecState*);
117 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionError(JSC::ExecState*);
118 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionInfo(JSC::ExecState*);
119 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionLog(JSC::ExecState*);
120 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionWarn(JSC::ExecState*);
121 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionDir(JSC::ExecState*);
122 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionDirxml(JSC::ExecState*);
123 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTrace(JSC::ExecState*);
124 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionAssert(JSC::ExecState*);
125 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionCount(JSC::ExecState*);
126 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionMarkTimeline(JSC::ExecState*);
127 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionProfile(JSC::ExecState*);
128 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionProfileEnd(JSC::ExecState*);
129 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTime(JSC::ExecState*);
130 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTimeEnd(JSC::ExecState*);
131 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTimeStamp(JSC::ExecState*);
132 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroup(JSC::ExecState*);
133 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroupCollapsed(JSC::ExecState*);
134 JSC::EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroupEnd(JSC::ExecState*);
135 // Attributes
136
137 JSC::JSValue jsConsoleProfiles(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
138 JSC::JSValue jsConsoleMemory(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
139
140 } // namespace WebCore
141
142 #endif