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., 59 Temple Place - Suite 330,
18     Boston, MA 02111-1307, USA.
19 */
20 
21 #if ENABLE(DATABASE)
22 
23 #ifndef V8TestCallback_h
24 #define V8TestCallback_h
25 
26 #include "ActiveDOMCallback.h"
27 #include "TestCallback.h"
28 #include "WorldContextHandle.h"
29 #include <v8.h>
30 #include <wtf/Forward.h>
31 
32 namespace WebCore {
33 
34 class ScriptExecutionContext;
35 
36 class V8TestCallback : public TestCallback, public ActiveDOMCallback {
37 public:
create(v8::Local<v8::Value> value,ScriptExecutionContext * context)38     static PassRefPtr<V8TestCallback> create(v8::Local<v8::Value> value, ScriptExecutionContext* context)
39     {
40         ASSERT(value->IsObject());
41         ASSERT(context);
42         return adoptRef(new V8TestCallback(value->ToObject(), context));
43     }
44 
45     virtual ~V8TestCallback();
46 
47     // Functions
48     virtual bool callbackWithNoParam();
49     virtual bool callbackWithClass1Param(Class1* class1Param);
50     virtual bool callbackWithClass2Param(Class2* class2Param, const String& strArg);
51     COMPILE_ASSERT(false)    virtual int callbackWithNonBoolReturnType(Class3* class3Param);
52     virtual int customCallback(Class5* class5Param, Class6* class6Param);
53     virtual bool callbackWithStringList(PassRefPtr<DOMStringList> listParam);
54 
55 private:
56     V8TestCallback(v8::Local<v8::Object>, ScriptExecutionContext*);
57 
58     v8::Persistent<v8::Object> m_callback;
59     WorldContextHandle m_worldContext;
60 };
61 
62 }
63 
64 #endif // V8TestCallback_h
65 
66 #endif // ENABLE(DATABASE)
67