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

Side by Side Diff: Source/bindings/templates/callback_interface.h

Issue 17572008: WIP IDL compiler rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Branch: const + primitive type readonly attributes Created 7 years, 4 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.
3 This file has been auto-generated by CodeGeneratorV8.pm. 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 {# FIXME: update license header
21 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 22 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 23 *
4 * Redistribution and use in source and binary forms, with or without 24 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 25 * modification, are permitted provided that the following conditions are
6 * met: 26 * met:
7 * 27 *
8 * * Redistributions of source code must retain the above copyright 28 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 29 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 30 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer 31 * copyright notice, this list of conditions and the following disclaimer
(...skipping 10 matching lines...) Expand all
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 44 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 45 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 46 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 47 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 49 */
30 50
31 // This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 51 // This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
52 #}
32 53
33 #ifndef {{v8_class_name}}_h 54 #ifndef {{v8_class_name}}_h
34 #define {{v8_class_name}}_h 55 #define {{v8_class_name}}_h
35 56
36 {% if conditional_string %} 57 {% if conditional_string %}
37 #if {{conditional_string}} 58 #if {{conditional_string}}
38 {% endif %} 59 {% endif %}
39 {% for filename in header_includes %} 60 {% for filename in header_includes %}
40 #include "{{filename}}" 61 #include "{{filename}}"
41 {% endfor %} 62 {% endfor %}
42 63
43 namespace WebCore { 64 namespace WebCore {
44 65
45 class ScriptExecutionContext; 66 class ScriptExecutionContext;
46 67
68
47 class {{v8_class_name}} : public {{cpp_class_name}}, public ActiveDOMCallback { 69 class {{v8_class_name}} : public {{cpp_class_name}}, public ActiveDOMCallback {
48 public: 70 public:
49 static PassRefPtr<{{v8_class_name}}> create(v8::Handle<v8::Value> value, Scr iptExecutionContext* context) 71 static PassRefPtr<{{v8_class_name}}> create(v8::Handle<v8::Value> value, Scr iptExecutionContext* context)
50 { 72 {
51 ASSERT(value->IsObject()); 73 ASSERT(value->IsObject());
52 ASSERT(context); 74 ASSERT(context);
53 return adoptRef(new {{v8_class_name}}(v8::Handle<v8::Object>::Cast(value ), context)); 75 return adoptRef(new {{v8_class_name}}(v8::Handle<v8::Object>::Cast(value ), context));
54 } 76 }
55 77
56 virtual ~{{v8_class_name}}(); 78 virtual ~{{v8_class_name}}();
57 79
80 // Functions
58 {% for method in methods %} 81 {% for method in methods %}
59 virtual {{method.return_cpp_type}} {{method.name}}({{method.argument_declara tion}}); 82 virtual {{method.return_cpp_type}} {{method.name}}({{method.argument_declara tion}});
60 {% endfor %} 83 {% endfor %}
61 84
62 virtual ScriptExecutionContext* scriptExecutionContext() const { return Cont extLifecycleObserver::scriptExecutionContext(); } 85 virtual ScriptExecutionContext* scriptExecutionContext() const { return Cont extLifecycleObserver::scriptExecutionContext(); }
63 86
64 private: 87 private:
65 {{v8_class_name}}(v8::Handle<v8::Object>, ScriptExecutionContext*); 88 {{v8_class_name}}(v8::Handle<v8::Object>, ScriptExecutionContext*);
66 89
67 ScopedPersistent<v8::Object> m_callback; 90 ScopedPersistent<v8::Object> m_callback;
68 RefPtr<DOMWrapperWorld> m_world; 91 RefPtr<DOMWrapperWorld> m_world;
69 }; 92 };
70 93
71 } 94 }
95 {% if conditional_string %}
72 96
73 {% if conditional_string %}
74 #endif // {{conditional_string}} 97 #endif // {{conditional_string}}
75 {% endif %} 98 {% endif %}
99
76 #endif // {{v8_class_name}}_h 100 #endif // {{v8_class_name}}_h
77 101
102
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes_wip.cpp ('k') | Source/bindings/templates/callback_interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698