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

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

Issue 138613002: Make generated Callback bindings classes FINAL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 {# 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 26 matching lines...) Expand all
37 37
38 {% filter conditional(conditional_string) %} 38 {% filter conditional(conditional_string) %}
39 {% for filename in header_includes %} 39 {% for filename in header_includes %}
40 #include "{{filename}}" 40 #include "{{filename}}"
41 {% endfor %} 41 {% endfor %}
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 class ExecutionContext; 45 class ExecutionContext;
46 46
47 class {{v8_class}} : public {{cpp_class}}, public ActiveDOMCallback { 47 class {{v8_class}} FINAL : public {{cpp_class}}, public ActiveDOMCallback {
48 public: 48 public:
49 static PassOwnPtr<{{v8_class}}> create(v8::Handle<v8::Function> callback, Ex ecutionContext* context) 49 static PassOwnPtr<{{v8_class}}> create(v8::Handle<v8::Function> callback, Ex ecutionContext* context)
50 { 50 {
51 ASSERT(context); 51 ASSERT(context);
52 return adoptPtr(new {{v8_class}}(callback, context)); 52 return adoptPtr(new {{v8_class}}(callback, context));
53 } 53 }
54 54
55 virtual ~{{v8_class}}(); 55 virtual ~{{v8_class}}();
56 56
57 {% for method in methods %} 57 {% for method in methods %}
58 virtual {{method.return_cpp_type}} {{method.name}}({{method.argument_declara tions | join(', ')}}); 58 virtual {{method.return_cpp_type}} {{method.name}}({{method.argument_declara tions | join(', ')}}) OVERRIDE;
59 {% endfor %} 59 {% endfor %}
60 private: 60 private:
61 {{v8_class}}(v8::Handle<v8::Function>, ExecutionContext*); 61 {{v8_class}}(v8::Handle<v8::Function>, ExecutionContext*);
62 62
63 ScopedPersistent<v8::Function> m_callback; 63 ScopedPersistent<v8::Function> m_callback;
64 RefPtr<DOMWrapperWorld> m_world; 64 RefPtr<DOMWrapperWorld> m_world;
65 }; 65 };
66 66
67 } 67 }
68 {% endfilter %} 68 {% endfilter %}
69 #endif // {{v8_class}}_h 69 #endif // {{v8_class}}_h
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestCallbackInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698