| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class ActiveDOMObject; | 63 class ActiveDOMObject; |
| 64 class CustomElementDefinition; | 64 class CustomElementDefinition; |
| 65 class DOMWindow; | 65 class DOMWindow; |
| 66 class DartApplicationLoader; | 66 class DartApplicationLoader; |
| 67 class DartAsyncLoader; | 67 class DartAsyncLoader; |
| 68 class DartEventListener; | 68 class DartEventListener; |
| 69 class DartIsolateDestructionObserver; | 69 class DartIsolateDestructionObserver; |
| 70 class DartWeakCallback; | 70 class DartWeakCallback; |
| 71 class Element; | |
| 72 class EventTarget; | 71 class EventTarget; |
| 73 class MessagePort; | 72 class MessagePort; |
| 74 class Node; | 73 class Node; |
| 75 class ScriptExecutionContext; | 74 class ScriptExecutionContext; |
| 76 class ThreadSafeDartIsolateWrapper; | 75 class ThreadSafeDartIsolateWrapper; |
| 77 | 76 |
| 78 typedef HashMap<Node*, Dart_WeakPersistentHandle> DartDOMNodeMap; | 77 typedef HashMap<Node*, Dart_WeakPersistentHandle> DartDOMNodeMap; |
| 79 typedef HashMap<void*, Dart_WeakPersistentHandle> DartDOMObjectMap; | 78 typedef HashMap<void*, Dart_WeakPersistentHandle> DartDOMObjectMap; |
| 80 typedef HashMap<MessagePort*, Dart_WeakPersistentHandle> DartMessagePortMap; | 79 typedef HashMap<MessagePort*, Dart_WeakPersistentHandle> DartMessagePortMap; |
| 81 typedef HashMap<ActiveDOMObject*, Dart_WeakPersistentHandle> DartActiveDOMObject
Map; | 80 typedef HashMap<ActiveDOMObject*, Dart_WeakPersistentHandle> DartActiveDOMObject
Map; |
| 82 typedef HashMap<EventTarget*, Dart_WeakPersistentHandle> DartEventTargetMap; | 81 typedef HashMap<EventTarget*, Dart_WeakPersistentHandle> DartEventTargetMap; |
| 83 typedef HashSet<DartWeakCallback*> DartWeakCallbacks; | 82 typedef HashSet<DartWeakCallback*> DartWeakCallbacks; |
| 84 typedef HashSet<DartIsolateDestructionObserver*> DartIsolateDestructionObservers
; | 83 typedef HashSet<DartIsolateDestructionObserver*> DartIsolateDestructionObservers
; |
| 85 typedef HashMap<CustomElementDefinition*, OwnPtr<DartCustomElementBinding> > Dar
tCustomElementBindingMap; | 84 typedef HashMap<CustomElementDefinition*, OwnPtr<DartCustomElementBinding> > Dar
tCustomElementBindingMap; |
| 86 typedef Dart_PersistentHandle ClassTable[NumWebkitClassIds]; | 85 typedef Dart_PersistentHandle ClassTable[NumWebkitClassIds]; |
| 87 typedef Dart_PersistentHandle LibraryTable[NumDartLibraryIds]; | 86 typedef Dart_PersistentHandle LibraryTable[NumDartLibraryIds]; |
| 88 typedef Vector<Element*> DartUpgradingElementVector; | |
| 89 | 87 |
| 90 class DartDOMData { | 88 class DartDOMData { |
| 91 public: | 89 public: |
| 92 DartDOMData(ScriptExecutionContext*, bool isDOMEnabled); | 90 DartDOMData(ScriptExecutionContext*, bool isDOMEnabled); |
| 93 ~DartDOMData(); | 91 ~DartDOMData(); |
| 94 | 92 |
| 95 static DartDOMData* current(); | 93 static DartDOMData* current(); |
| 96 | 94 |
| 97 ScriptExecutionContext* scriptExecutionContext() { return m_scriptExecutionC
ontext; } | 95 ScriptExecutionContext* scriptExecutionContext() { return m_scriptExecutionC
ontext; } |
| 98 bool isDOMEnabled() { return m_isDOMEnabled; } | 96 bool isDOMEnabled() { return m_isDOMEnabled; } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 125 DartWeakCallbacks* weakCallbacks() { return &m_weakCallbacks; } | 123 DartWeakCallbacks* weakCallbacks() { return &m_weakCallbacks; } |
| 126 DartIsolateDestructionObservers* isolateDestructionObservers() | 124 DartIsolateDestructionObservers* isolateDestructionObservers() |
| 127 { | 125 { |
| 128 return &m_isolateDestructionObservers; | 126 return &m_isolateDestructionObservers; |
| 129 } | 127 } |
| 130 ClassTable* classHandleCache() { return &m_classHandleCache; } | 128 ClassTable* classHandleCache() { return &m_classHandleCache; } |
| 131 | 129 |
| 132 void addCustomElementBinding(CustomElementDefinition*, PassOwnPtr<DartCustom
ElementBinding>); | 130 void addCustomElementBinding(CustomElementDefinition*, PassOwnPtr<DartCustom
ElementBinding>); |
| 133 void clearCustomElementBinding(CustomElementDefinition*); | 131 void clearCustomElementBinding(CustomElementDefinition*); |
| 134 DartCustomElementBinding* customElementBinding(CustomElementDefinition*); | 132 DartCustomElementBinding* customElementBinding(CustomElementDefinition*); |
| 135 // Stack of elements which are in the process of being upgraded. | |
| 136 void pushUpgradingCustomElement(Element*); | |
| 137 Element* popUpgradingCustomElement(); | |
| 138 bool isUpgradingCustomElement(Element*); | |
| 139 | 133 |
| 140 Dart_PersistentHandle library(int libraryId) const { return m_libraryHandleC
ache[libraryId]; } | 134 Dart_PersistentHandle library(int libraryId) const { return m_libraryHandleC
ache[libraryId]; } |
| 141 Dart_PersistentHandle coreLibrary() const | 135 Dart_PersistentHandle coreLibrary() const |
| 142 { | 136 { |
| 143 return m_libraryHandleCache[DartCoreLibraryId]; | 137 return m_libraryHandleCache[DartCoreLibraryId]; |
| 144 } | 138 } |
| 145 void setCoreLibrary(Dart_PersistentHandle lib) | 139 void setCoreLibrary(Dart_PersistentHandle lib) |
| 146 { | 140 { |
| 147 m_libraryHandleCache[DartCoreLibraryId] = lib; | 141 m_libraryHandleCache[DartCoreLibraryId] = lib; |
| 148 } | 142 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 DartDOMNodeMap m_nodeMap; | 219 DartDOMNodeMap m_nodeMap; |
| 226 DartDOMObjectMap m_objectMap; | 220 DartDOMObjectMap m_objectMap; |
| 227 DartMessagePortMap m_messagePortMap; | 221 DartMessagePortMap m_messagePortMap; |
| 228 DartActiveDOMObjectMap m_activeObjectMap; | 222 DartActiveDOMObjectMap m_activeObjectMap; |
| 229 DartEventTargetMap m_eventTargetMap; | 223 DartEventTargetMap m_eventTargetMap; |
| 230 DartWeakCallbacks m_weakCallbacks; | 224 DartWeakCallbacks m_weakCallbacks; |
| 231 DartIsolateDestructionObservers m_isolateDestructionObservers; | 225 DartIsolateDestructionObservers m_isolateDestructionObservers; |
| 232 DartCustomElementBindingMap m_customElementBindings; | 226 DartCustomElementBindingMap m_customElementBindings; |
| 233 ClassTable m_classHandleCache; | 227 ClassTable m_classHandleCache; |
| 234 LibraryTable m_libraryHandleCache; | 228 LibraryTable m_libraryHandleCache; |
| 235 DartUpgradingElementVector m_upgradingElements; | |
| 236 }; | 229 }; |
| 237 | 230 |
| 238 } | 231 } |
| 239 | 232 |
| 240 #endif // DartDOMData_h | 233 #endif // DartDOMData_h |
| OLD | NEW |