OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DOMWindow_h | 5 #ifndef DOMWindow_h |
6 #define DOMWindow_h | 6 #define DOMWindow_h |
7 | 7 |
| 8 #include "bindings/core/v8/TraceWrapperMember.h" |
8 #include "bindings/core/v8/Transferables.h" | 9 #include "bindings/core/v8/Transferables.h" |
9 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
10 #include "core/events/EventTarget.h" | 11 #include "core/events/EventTarget.h" |
11 #include "core/frame/DOMWindowBase64.h" | 12 #include "core/frame/DOMWindowBase64.h" |
12 #include "core/frame/Frame.h" | 13 #include "core/frame/Frame.h" |
13 #include "platform/heap/Handle.h" | 14 #include "platform/heap/Handle.h" |
14 #include "platform/wtf/Assertions.h" | 15 #include "platform/wtf/Assertions.h" |
15 #include "platform/wtf/Forward.h" | 16 #include "platform/wtf/Forward.h" |
16 | 17 |
17 namespace blink { | 18 namespace blink { |
(...skipping 26 matching lines...) Expand all Loading... |
44 // issues where executing script incorrectly schedules work on a detached | 45 // issues where executing script incorrectly schedules work on a detached |
45 // frame. | 46 // frame. |
46 SECURITY_DCHECK(!frame_ || | 47 SECURITY_DCHECK(!frame_ || |
47 (frame_->DomWindow() == this && frame_->GetPage())); | 48 (frame_->DomWindow() == this && frame_->GetPage())); |
48 return frame_; | 49 return frame_; |
49 } | 50 } |
50 | 51 |
51 // GarbageCollectedFinalized overrides: | 52 // GarbageCollectedFinalized overrides: |
52 DECLARE_VIRTUAL_TRACE(); | 53 DECLARE_VIRTUAL_TRACE(); |
53 | 54 |
| 55 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| 56 |
54 virtual bool IsLocalDOMWindow() const = 0; | 57 virtual bool IsLocalDOMWindow() const = 0; |
55 virtual bool IsRemoteDOMWindow() const = 0; | 58 virtual bool IsRemoteDOMWindow() const = 0; |
56 | 59 |
57 // ScriptWrappable overrides: | 60 // ScriptWrappable overrides: |
58 v8::Local<v8::Object> Wrap(v8::Isolate*, | 61 v8::Local<v8::Object> Wrap(v8::Isolate*, |
59 v8::Local<v8::Object> creation_context) final; | 62 v8::Local<v8::Object> creation_context) final; |
60 v8::Local<v8::Object> AssociateWithWrapper( | 63 v8::Local<v8::Object> AssociateWithWrapper( |
61 v8::Isolate*, | 64 v8::Isolate*, |
62 const WrapperTypeInfo*, | 65 const WrapperTypeInfo*, |
63 v8::Local<v8::Object> wrapper) final; | 66 v8::Local<v8::Object> wrapper) final; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 123 |
121 void DisconnectFromFrame() { frame_ = nullptr; } | 124 void DisconnectFromFrame() { frame_ = nullptr; } |
122 | 125 |
123 private: | 126 private: |
124 Member<Frame> frame_; | 127 Member<Frame> frame_; |
125 // Unlike |frame_|, |window_proxy_manager_| is available even after the | 128 // Unlike |frame_|, |window_proxy_manager_| is available even after the |
126 // window's frame gets detached from the DOM, until the end of the lifetime | 129 // window's frame gets detached from the DOM, until the end of the lifetime |
127 // of this object. | 130 // of this object. |
128 const Member<WindowProxyManager> window_proxy_manager_; | 131 const Member<WindowProxyManager> window_proxy_manager_; |
129 Member<InputDeviceCapabilitiesConstants> input_capabilities_; | 132 Member<InputDeviceCapabilitiesConstants> input_capabilities_; |
130 mutable Member<Location> location_; | 133 mutable TraceWrapperMember<Location> location_; |
131 | 134 |
132 // Set to true when close() has been called. Needed for | 135 // Set to true when close() has been called. Needed for |
133 // |window.closed| determinism; having it return 'true' | 136 // |window.closed| determinism; having it return 'true' |
134 // only after the layout widget's deferred window close | 137 // only after the layout widget's deferred window close |
135 // operation has been performed, exposes (confusing) | 138 // operation has been performed, exposes (confusing) |
136 // implementation details to scripts. | 139 // implementation details to scripts. |
137 bool window_is_closing_; | 140 bool window_is_closing_; |
138 }; | 141 }; |
139 | 142 |
140 } // namespace blink | 143 } // namespace blink |
141 | 144 |
142 #endif // DOMWindow_h | 145 #endif // DOMWindow_h |
OLD | NEW |