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

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

Issue 101443002: IDL compiler: remove redundant '_name' from template parameters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/templates/callback_interface.h ('k') | Source/bindings/templates/interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {# http://www.chromium.org/blink/coding-style#TOC-License #} 1 {# http://www.chromium.org/blink/coding-style#TOC-License #}
2 /* 2 /*
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 16 matching lines...) Expand all
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 {# FIXME: Rename to Python when switch #} 32 {# FIXME: Rename to Python when switch #}
33 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 33 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
34 34
35 #include "config.h" 35 #include "config.h"
36 {% filter conditional(conditional_string) %} 36 {% filter conditional(conditional_string) %}
37 #include "{{v8_class_name}}.h" 37 #include "{{v8_class}}.h"
38 38
39 {% for filename in cpp_includes %} 39 {% for filename in cpp_includes %}
40 #include "{{filename}}" 40 #include "{{filename}}"
41 {% endfor %} 41 {% endfor %}
42 namespace WebCore { 42 namespace WebCore {
43 43
44 {{v8_class_name}}::{{v8_class_name}}(v8::Handle<v8::Object> callback, ExecutionC ontext* context) 44 {{v8_class}}::{{v8_class}}(v8::Handle<v8::Object> callback, ExecutionContext* co ntext)
45 : ActiveDOMCallback(context) 45 : ActiveDOMCallback(context)
46 , m_callback(toIsolate(context), callback) 46 , m_callback(toIsolate(context), callback)
47 , m_world(DOMWrapperWorld::current()) 47 , m_world(DOMWrapperWorld::current())
48 { 48 {
49 } 49 }
50 50
51 {{v8_class_name}}::~{{v8_class_name}}() 51 {{v8_class}}::~{{v8_class}}()
52 { 52 {
53 } 53 }
54 54
55 {% for method in methods if not method.custom %} 55 {% for method in methods if not method.custom %}
56 {{method.return_cpp_type}} {{v8_class_name}}::{{method.name}}({{method.argument_ declarations | join(', ')}}) 56 {{method.return_cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_decla rations | join(', ')}})
57 { 57 {
58 if (!canInvokeCallback()) 58 if (!canInvokeCallback())
59 return true; 59 return true;
60 60
61 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 61 v8::Isolate* isolate = v8::Isolate::GetCurrent();
62 v8::HandleScope handleScope(isolate); 62 v8::HandleScope handleScope(isolate);
63 63
64 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world. get()); 64 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world. get());
65 if (v8Context.IsEmpty()) 65 if (v8Context.IsEmpty())
66 return true; 66 return true;
(...skipping 23 matching lines...) Expand all
90 {% endif %} 90 {% endif %}
91 91
92 bool callbackReturnValue = false; 92 bool callbackReturnValue = false;
93 {% set this_handle_parameter = 'v8::Handle<v8::Object>::Cast(thisHandle), ' if method.call_with_this_handle else '' %} 93 {% set this_handle_parameter = 'v8::Handle<v8::Object>::Cast(thisHandle), ' if method.call_with_this_handle else '' %}
94 return !invokeCallback(m_callback.newLocal(isolate), {{this_handle_parameter }}{{method.arguments | length}}, argv, callbackReturnValue, executionContext(), isolate); 94 return !invokeCallback(m_callback.newLocal(isolate), {{this_handle_parameter }}{{method.arguments | length}}, argv, callbackReturnValue, executionContext(), isolate);
95 } 95 }
96 96
97 {% endfor %} 97 {% endfor %}
98 } // namespace WebCore 98 } // namespace WebCore
99 {% endfilter %} 99 {% endfilter %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/callback_interface.h ('k') | Source/bindings/templates/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698