| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 virtual void initialize() = 0; | 162 virtual void initialize() = 0; |
| 163 | 163 |
| 164 enum GlobalDetachmentBehavior { DoNotDetachGlobal, DetachGlobal }; | 164 enum GlobalDetachmentBehavior { DoNotDetachGlobal, DetachGlobal }; |
| 165 virtual void disposeContext(GlobalDetachmentBehavior) = 0; | 165 virtual void disposeContext(GlobalDetachmentBehavior) = 0; |
| 166 | 166 |
| 167 v8::Isolate* isolate() const { return m_isolate; } | 167 v8::Isolate* isolate() const { return m_isolate; } |
| 168 Frame* frame() const { return m_frame.get(); } | 168 Frame* frame() const { return m_frame.get(); } |
| 169 ScriptState* getScriptState() const { return m_scriptState.get(); } | 169 ScriptState* getScriptState() const { return m_scriptState.get(); } |
| 170 | 170 |
| 171 #if DCHECK_IS_ON() |
| 172 void didAttachGlobalProxy() { m_isGlobalProxyAttached = true; } |
| 173 void didDetachGlobalProxy() { m_isGlobalProxyAttached = false; } |
| 174 #endif |
| 175 |
| 171 private: | 176 private: |
| 172 v8::Isolate* const m_isolate; | 177 v8::Isolate* const m_isolate; |
| 173 const Member<Frame> m_frame; | 178 const Member<Frame> m_frame; |
| 179 #if DCHECK_IS_ON() |
| 180 bool m_isGlobalProxyAttached = false; |
| 181 #endif |
| 174 | 182 |
| 175 protected: | 183 protected: |
| 176 // TODO(dcheng): Move this to LocalWindowProxy once RemoteWindowProxy uses | 184 // TODO(dcheng): Move this to LocalWindowProxy once RemoteWindowProxy uses |
| 177 // remote contexts. | 185 // remote contexts. |
| 178 RefPtr<ScriptState> m_scriptState; | 186 RefPtr<ScriptState> m_scriptState; |
| 179 // TODO(dcheng): Consider making these private and using getters. | 187 // TODO(dcheng): Consider making these private and using getters. |
| 180 const RefPtr<DOMWrapperWorld> m_world; | 188 const RefPtr<DOMWrapperWorld> m_world; |
| 181 ScopedPersistent<v8::Object> m_globalProxy; | 189 ScopedPersistent<v8::Object> m_globalProxy; |
| 182 Lifecycle m_lifecycle; | 190 Lifecycle m_lifecycle; |
| 183 }; | 191 }; |
| 184 | 192 |
| 185 } // namespace blink | 193 } // namespace blink |
| 186 | 194 |
| 187 #endif // WindowProxy_h | 195 #endif // WindowProxy_h |
| OLD | NEW |