OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef V8PerContextData_h | 31 #ifndef V8PerContextData_h |
32 #define V8PerContextData_h | 32 #define V8PerContextData_h |
33 | 33 |
| 34 #include "bindings/core/v8/CSSPaintBinding.h" |
34 #include "bindings/core/v8/CustomElementBinding.h" | 35 #include "bindings/core/v8/CustomElementBinding.h" |
35 #include "bindings/core/v8/ScopedPersistent.h" | 36 #include "bindings/core/v8/ScopedPersistent.h" |
36 #include "bindings/core/v8/V8GlobalValueMap.h" | 37 #include "bindings/core/v8/V8GlobalValueMap.h" |
37 #include "bindings/core/v8/WrapperTypeInfo.h" | 38 #include "bindings/core/v8/WrapperTypeInfo.h" |
38 #include "core/CoreExport.h" | 39 #include "core/CoreExport.h" |
39 #include "gin/public/context_holder.h" | 40 #include "gin/public/context_holder.h" |
40 #include "gin/public/gin_embedders.h" | 41 #include "gin/public/gin_embedders.h" |
41 #include "wtf/Allocator.h" | 42 #include "wtf/Allocator.h" |
42 #include "wtf/HashMap.h" | 43 #include "wtf/HashMap.h" |
43 #include "wtf/PassOwnPtr.h" | 44 #include "wtf/PassOwnPtr.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 { | 84 { |
84 v8::Local<v8::Function> interfaceObject = m_constructorMap.Get(type); | 85 v8::Local<v8::Function> interfaceObject = m_constructorMap.Get(type); |
85 return (!interfaceObject.IsEmpty()) ? interfaceObject : constructorForTy
peSlowCase(type); | 86 return (!interfaceObject.IsEmpty()) ? interfaceObject : constructorForTy
peSlowCase(type); |
86 } | 87 } |
87 | 88 |
88 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); | 89 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); |
89 | 90 |
90 V8NPObjectMap* getV8NPObjectMap() { return &m_v8NPObjectMap; } | 91 V8NPObjectMap* getV8NPObjectMap() { return &m_v8NPObjectMap; } |
91 | 92 |
92 void addCustomElementBinding(PassOwnPtr<CustomElementBinding>); | 93 void addCustomElementBinding(PassOwnPtr<CustomElementBinding>); |
| 94 void addCSSPaintBinding(PassOwnPtr<CSSPaintBinding>); |
93 | 95 |
94 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } | 96 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } |
95 void setActivityLogger(V8DOMActivityLogger* activityLogger) { m_activityLogg
er = activityLogger; } | 97 void setActivityLogger(V8DOMActivityLogger* activityLogger) { m_activityLogg
er = activityLogger; } |
96 | 98 |
97 v8::Local<v8::Value> compiledPrivateScript(String); | 99 v8::Local<v8::Value> compiledPrivateScript(String); |
98 void setCompiledPrivateScript(String, v8::Local<v8::Value>); | 100 void setCompiledPrivateScript(String, v8::Local<v8::Value>); |
99 | 101 |
100 private: | 102 private: |
101 V8PerContextData(v8::Local<v8::Context>); | 103 V8PerContextData(v8::Local<v8::Context>); |
102 | 104 |
(...skipping 13 matching lines...) Expand all Loading... |
116 V8NPObjectMap m_v8NPObjectMap; | 118 V8NPObjectMap m_v8NPObjectMap; |
117 | 119 |
118 OwnPtr<gin::ContextHolder> m_contextHolder; | 120 OwnPtr<gin::ContextHolder> m_contextHolder; |
119 | 121 |
120 ScopedPersistent<v8::Context> m_context; | 122 ScopedPersistent<v8::Context> m_context; |
121 ScopedPersistent<v8::Value> m_errorPrototype; | 123 ScopedPersistent<v8::Value> m_errorPrototype; |
122 | 124 |
123 typedef Vector<OwnPtr<CustomElementBinding>> CustomElementBindingList; | 125 typedef Vector<OwnPtr<CustomElementBinding>> CustomElementBindingList; |
124 CustomElementBindingList m_customElementBindings; | 126 CustomElementBindingList m_customElementBindings; |
125 | 127 |
| 128 typedef Vector<OwnPtr<CSSPaintBinding>> CSSPaintBindingList; |
| 129 CSSPaintBindingList m_cssPaintBindings; |
| 130 |
126 // This is owned by a static hash map in V8DOMActivityLogger. | 131 // This is owned by a static hash map in V8DOMActivityLogger. |
127 V8DOMActivityLogger* m_activityLogger; | 132 V8DOMActivityLogger* m_activityLogger; |
128 | 133 |
129 V8GlobalValueMap<String, v8::Value, v8::kNotWeak> m_compiledPrivateScript; | 134 V8GlobalValueMap<String, v8::Value, v8::kNotWeak> m_compiledPrivateScript; |
130 }; | 135 }; |
131 | 136 |
132 } // namespace blink | 137 } // namespace blink |
133 | 138 |
134 #endif // V8PerContextData_h | 139 #endif // V8PerContextData_h |
OLD | NEW |