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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl

Issue 2383613003: Remove 'V8' prefix from generated callback function classes (Closed)
Patch Set: rebase Created 4 years, 2 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 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %} 1 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %}
2 {% filter format_blink_cpp_source_code %} 2 {% filter format_blink_cpp_source_code %}
3 3
4 {% include 'copyright_block.txt' %} 4 {% include 'copyright_block.txt' %}
5 5
6 #include "{{v8_class}}.h" 6 #include "{{cpp_class}}.h"
7 7
8 {% for filename in cpp_includes %} 8 {% for filename in cpp_includes %}
9 #include "{{filename}}" 9 #include "{{filename}}"
10 {% endfor %} 10 {% endfor %}
11 11
12 namespace blink { 12 namespace blink {
13 13
14 {{v8_class}}::{{v8_class}}(v8::Isolate* isolate, v8::Local<v8::Function> callbac k) 14 {{cpp_class}}::{{cpp_class}}(v8::Isolate* isolate, v8::Local<v8::Function> callb ack)
15 : m_callback(isolate, callback) 15 : m_callback(isolate, callback)
16 { 16 {
17 DCHECK(!m_callback.isEmpty()); 17 DCHECK(!m_callback.isEmpty());
18 m_callback.setPhantom(); 18 m_callback.setPhantom();
19 } 19 }
20 20
21 DEFINE_TRACE({{v8_class}}) 21 DEFINE_TRACE({{cpp_class}})
22 { 22 {
23 } 23 }
24 24
25 bool {{v8_class}}::call({{argument_declarations | join(', ')}}) 25 bool {{cpp_class}}::call({{argument_declarations | join(', ')}})
26 { 26 {
27 if (!scriptState->contextIsValid()) 27 if (!scriptState->contextIsValid())
28 return false; 28 return false;
29 29
30 ExecutionContext* context = scriptState->getExecutionContext(); 30 ExecutionContext* context = scriptState->getExecutionContext();
31 DCHECK(context); 31 DCHECK(context);
32 if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreS topped()) 32 if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreS topped())
33 return false; 33 return false;
34 34
35 if (m_callback.isEmpty()) 35 if (m_callback.isEmpty())
(...skipping 25 matching lines...) Expand all
61 returnValue = cppValue; 61 returnValue = cppValue;
62 {% endif %} 62 {% endif %}
63 return true; 63 return true;
64 } 64 }
65 return false; 65 return false;
66 } 66 }
67 67
68 } // namespace blink 68 } // namespace blink
69 69
70 {% endfilter %}{# format_blink_cpp_source_code #} 70 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698