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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% include 'copyright_block.txt' %} 3 {% include 'copyright_block.txt' %}
4 4
5 #ifndef {{cpp_class}}_h 5 #ifndef {{cpp_class}}_h
6 #define {{cpp_class}}_h 6 #define {{cpp_class}}_h
7 7
8 {% for filename in header_includes %} 8 {% for filename in header_includes %}
9 #include "{{filename}}" 9 #include "{{filename}}"
10 {% endfor %} 10 {% endfor %}
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class ScriptState; 14 class ScriptState;
15 {% for forward_declaration in forward_declarations %} 15 {% for forward_declaration in forward_declarations %}
16 class {{forward_declaration}}; 16 class {{forward_declaration}};
17 {% endfor %} 17 {% endfor %}
18 18
19 class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_c lass}}>, public TraceWrapperBase { 19 class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_c lass}}>, public TraceWrapperBase {
20 public: 20 public:
21 static {{cpp_class}}* create(ScriptState*, v8::Local<v8::Value> callback); 21 static {{cpp_class}}* Create(ScriptState*, v8::Local<v8::Value> callback);
22 22
23 ~{{cpp_class}}() = default; 23 ~{{cpp_class}}() = default;
24 24
25 DEFINE_INLINE_TRACE() {} 25 DEFINE_INLINE_TRACE() {}
26 DECLARE_TRACE_WRAPPERS(); 26 DECLARE_TRACE_WRAPPERS();
27 27
28 bool call({{argument_declarations | join(', ')}}); 28 bool call({{argument_declarations | join(', ')}});
29 29
30 v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { 30 v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
31 return m_callback.newLocal(isolate); 31 return m_callback.NewLocal(isolate);
32 } 32 }
33 33
34 private: 34 private:
35 {{cpp_class}}(ScriptState*, v8::Local<v8::Function>); 35 {{cpp_class}}(ScriptState*, v8::Local<v8::Function>);
36 36
37 RefPtr<ScriptState> m_scriptState; 37 RefPtr<ScriptState> m_scriptState;
38 TraceWrapperV8Reference<v8::Function> m_callback; 38 TraceWrapperV8Reference<v8::Function> m_callback;
39 }; 39 };
40 40
41 template <> 41 template <>
42 struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_cla ss}}> { 42 struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_cla ss}}> {
43 {{exported}}static {{cpp_class}}* nativeValue(v8::Isolate*, v8::Local<v8::Valu e>, ExceptionState&); 43 {{exported}}static {{cpp_class}}* NativeValue(v8::Isolate*, v8::Local<v8::Valu e>, ExceptionState&);
44 }; 44 };
45 45
46 } // namespace blink 46 } // namespace blink
47 47
48 #endif // {{cpp_class}}_h 48 #endif // {{cpp_class}}_h
49 49
50 {% endfilter %}{# format_blink_cpp_source_code #} 50 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698