| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 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 #ifndef {{v8_class_name}}_h | 35 #ifndef {{v8_class}}_h |
| 36 #define {{v8_class_name}}_h | 36 #define {{v8_class}}_h |
| 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_name}} : public {{cpp_class_name}}, public ActiveDOMCallback { | 47 class {{v8_class}} : public {{cpp_class}}, public ActiveDOMCallback { |
| 48 public: | 48 public: |
| 49 {% set ptr_type = 'PassRefPtr' if ref_counted else 'PassOwnPtr' %} | 49 {% set ptr_type = 'PassRefPtr' if ref_counted else 'PassOwnPtr' %} |
| 50 {% set adopt_type = 'adoptRef' if ref_counted else 'adoptPtr' %} | 50 {% set adopt_type = 'adoptRef' if ref_counted else 'adoptPtr' %} |
| 51 static {{ptr_type}}<{{v8_class_name}}> create(v8::Handle<v8::Value> jsValue,
ExecutionContext* context) | 51 static {{ptr_type}}<{{v8_class}}> create(v8::Handle<v8::Value> jsValue, Exec
utionContext* context) |
| 52 { | 52 { |
| 53 ASSERT(jsValue->IsObject()); | 53 ASSERT(jsValue->IsObject()); |
| 54 ASSERT(context); | 54 ASSERT(context); |
| 55 return {{adopt_type}}(new {{v8_class_name}}(v8::Handle<v8::Object>::Cast
(jsValue), context)); | 55 return {{adopt_type}}(new {{v8_class}}(v8::Handle<v8::Object>::Cast(jsVa
lue), context)); |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual ~{{v8_class_name}}(); | 58 virtual ~{{v8_class}}(); |
| 59 | 59 |
| 60 {% for method in methods %} | 60 {% for method in methods %} |
| 61 virtual {{method.return_cpp_type}} {{method.name}}({{method.argument_declara
tions | join(', ')}}); | 61 virtual {{method.return_cpp_type}} {{method.name}}({{method.argument_declara
tions | join(', ')}}); |
| 62 {% endfor %} | 62 {% endfor %} |
| 63 | 63 |
| 64 virtual ExecutionContext* executionContext() const { return ContextLifecycle
Observer::executionContext(); } | 64 virtual ExecutionContext* executionContext() const { return ContextLifecycle
Observer::executionContext(); } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 {{v8_class_name}}(v8::Handle<v8::Object>, ExecutionContext*); | 67 {{v8_class}}(v8::Handle<v8::Object>, ExecutionContext*); |
| 68 | 68 |
| 69 ScopedPersistent<v8::Object> m_callback; | 69 ScopedPersistent<v8::Object> m_callback; |
| 70 RefPtr<DOMWrapperWorld> m_world; | 70 RefPtr<DOMWrapperWorld> m_world; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } | 73 } |
| 74 {% endfilter %} | 74 {% endfilter %} |
| 75 #endif // {{v8_class_name}}_h | 75 #endif // {{v8_class}}_h |
| OLD | NEW |