Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: Source/bindings/scripts/callbackHeader.template

Issue 17572008: WIP IDL compiler rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: non-callback headers working Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 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 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, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19 */ 19 */
20 20
21 #ifndef V8TestCallback_h 21 #ifndef {{v8_class_name}}_h
22 #define V8TestCallback_h 22 #define {{v8_class_name}}_h
23 23
24 #include "bindings/bindings/tests/idls/TestCallback.h" 24 {{conditional_if}}
25 #include "bindings/v8/ActiveDOMCallback.h" 25 {% for filename in includes -%}
26 #include "bindings/v8/DOMWrapperWorld.h" 26 #include "{{filename}}"
27 #include "bindings/v8/ScopedPersistent.h" 27 {% endfor %}
28
29 namespace WebCore { 28 namespace WebCore {
30 29
31 class ScriptExecutionContext; 30 class ScriptExecutionContext;
32 31
33 32
34 class V8TestCallback : public TestCallback, public ActiveDOMCallback { 33 class {{v8_class_name}} : public {{interface_name}}, public ActiveDOMCallback {
35 public: 34 public:
36 static PassRefPtr<V8TestCallback> create(v8::Handle<v8::Value> value, Script ExecutionContext* context) 35 static PassRefPtr<{{v8_class_name}}> create(v8::Handle<v8::Value> value, Scr iptExecutionContext* context)
37 { 36 {
38 ASSERT(value->IsObject()); 37 ASSERT(value->IsObject());
39 ASSERT(context); 38 ASSERT(context);
40 return adoptRef(new V8TestCallback(v8::Handle<v8::Object>::Cast(value), context)); 39 return adoptRef(new {{v8_class_name}}(v8::Handle<v8::Object>::Cast(value ), context));
41 } 40 }
42 41
43 virtual ~V8TestCallback(); 42 virtual ~{{v8_class_name}}();
44 43
45 // Functions 44 // Functions
46 virtual bool callbackWithNoParam(); 45 {% for definition in class_public_definitions -%}
47 virtual bool callbackWithTestObjectParam(TestObj* class1Param); 46 {{definition | indent(4, true)}}
48 virtual bool callbackWithTestObjectParam(TestObj* class2Param, const String& strArg); 47 {% endfor %}
49 virtual int customCallback(TestObj* testObjParam, TestObj* testObjParam);
50 virtual bool callbackWithStringList(RefPtr<DOMStringList> listParam);
51 virtual bool callbackWithBoolean(bool boolParam);
52 virtual bool callbackWithSequence(Vector<RefPtr<TestObj> > sequenceParam);
53
54 virtual ScriptExecutionContext* scriptExecutionContext() const { return Cont extLifecycleObserver::scriptExecutionContext(); } 48 virtual ScriptExecutionContext* scriptExecutionContext() const { return Cont extLifecycleObserver::scriptExecutionContext(); }
55 49
56 private: 50 private:
57 V8TestCallback(v8::Handle<v8::Object>, ScriptExecutionContext*); 51 {{v8_class_name}}(v8::Handle<v8::Object>, ScriptExecutionContext*);
58 52
59 ScopedPersistent<v8::Object> m_callback; 53 ScopedPersistent<v8::Object> m_callback;
60 RefPtr<DOMWrapperWorld> m_world; 54 RefPtr<DOMWrapperWorld> m_world;
61 }; 55 };
62 56
63 } 57 }
64 58
65 #endif // V8TestCallback_h 59 {{conditional_endif}}
66 60
61 #endif // {{v8_class_name}}_h
62
63
OLDNEW
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | Source/bindings/scripts/callbackImplementation.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698