OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 14 matching lines...) Expand all Loading... |
25 */ | 25 */ |
26 | 26 |
27 #ifndef LocalDOMWindow_h | 27 #ifndef LocalDOMWindow_h |
28 #define LocalDOMWindow_h | 28 #define LocalDOMWindow_h |
29 | 29 |
30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
31 #include "core/events/EventTarget.h" | 31 #include "core/events/EventTarget.h" |
32 #include "core/frame/DOMWindow.h" | 32 #include "core/frame/DOMWindow.h" |
33 #include "core/frame/DOMWindowLifecycleNotifier.h" | 33 #include "core/frame/DOMWindowLifecycleNotifier.h" |
34 #include "core/frame/DOMWindowLifecycleObserver.h" | 34 #include "core/frame/DOMWindowLifecycleObserver.h" |
35 #include "core/frame/FrameDestructionObserver.h" | |
36 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
| 36 #include "core/frame/LocalFrameLifecycleObserver.h" |
37 #include "platform/Supplementable.h" | 37 #include "platform/Supplementable.h" |
38 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
39 | 39 |
40 #include "wtf/Assertions.h" | 40 #include "wtf/Assertions.h" |
41 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class DOMWindowEventQueue; | 45 class DOMWindowEventQueue; |
46 class DOMWindowProperty; | 46 class DOMWindowProperty; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 void statePopped(PassRefPtr<SerializedScriptValue>); | 206 void statePopped(PassRefPtr<SerializedScriptValue>); |
207 | 207 |
208 // FIXME: This shouldn't be public once LocalDOMWindow becomes ExecutionCont
ext. | 208 // FIXME: This shouldn't be public once LocalDOMWindow becomes ExecutionCont
ext. |
209 void clearEventQueue(); | 209 void clearEventQueue(); |
210 | 210 |
211 void acceptLanguagesChanged(); | 211 void acceptLanguagesChanged(); |
212 | 212 |
213 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) override; | 213 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) override; |
214 | 214 |
215 private: | 215 private: |
216 // Rather than simply inheriting FrameDestructionObserver like most other | 216 // Rather than simply inheriting LocalFrameLifecycleObserver like most other |
217 // classes, LocalDOMWindow hides its FrameDestructionObserver with | 217 // classes, LocalDOMWindow hides its LocalFrameLifecycleObserver with |
218 // composition. This prevents conflicting overloads between DOMWindow, which | 218 // composition. This prevents conflicting overloads between DOMWindow, which |
219 // has a frame() accessor that returns Frame* for bindings code, and | 219 // has a frame() accessor that returns Frame* for bindings code, and |
220 // FrameDestructionObserver, which has a frame() accessor that returns a | 220 // LocalFrameLifecycleObserver, which has a frame() accessor that returns a |
221 // LocalFrame*. | 221 // LocalFrame*. |
222 class WindowFrameObserver final : public NoBaseWillBeGarbageCollected<Window
FrameObserver>, public FrameDestructionObserver { | 222 class WindowFrameObserver final : public NoBaseWillBeGarbageCollected<Window
FrameObserver>, public LocalFrameLifecycleObserver { |
223 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(WindowFrameObserver); | 223 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(WindowFrameObserver); |
224 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WindowFrameObserver); | 224 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WindowFrameObserver); |
225 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(WindowFrameObserver); | 225 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(WindowFrameObserver); |
226 public: | 226 public: |
227 static PassOwnPtrWillBeRawPtr<WindowFrameObserver> create(LocalDOMWindow
*, LocalFrame&); | 227 static PassOwnPtrWillBeRawPtr<WindowFrameObserver> create(LocalDOMWindow
*, LocalFrame&); |
228 | 228 |
229 DECLARE_VIRTUAL_TRACE(); | 229 DECLARE_VIRTUAL_TRACE(); |
230 | 230 |
231 private: | 231 private: |
232 WindowFrameObserver(LocalDOMWindow*, LocalFrame&); | 232 WindowFrameObserver(LocalDOMWindow*, LocalFrame&); |
233 | 233 |
234 // FrameDestructionObserver overrides: | 234 // LocalFrameLifecycleObserver overrides: |
235 void willDetachFrameHost() override; | 235 void willDetachFrameHost() override; |
236 void contextDestroyed() override; | 236 void contextDestroyed() override; |
237 | 237 |
238 RawPtrWillBeMember<LocalDOMWindow> m_window; | 238 RawPtrWillBeMember<LocalDOMWindow> m_window; |
239 }; | 239 }; |
240 friend WTF::OwnedPtrDeleter<WindowFrameObserver>; | 240 friend WTF::OwnedPtrDeleter<WindowFrameObserver>; |
241 | 241 |
242 explicit LocalDOMWindow(LocalFrame&); | 242 explicit LocalDOMWindow(LocalFrame&); |
243 | 243 |
244 Page* page(); | 244 Page* page(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 292 } |
293 | 293 |
294 inline String LocalDOMWindow::defaultStatus() const | 294 inline String LocalDOMWindow::defaultStatus() const |
295 { | 295 { |
296 return m_defaultStatus; | 296 return m_defaultStatus; |
297 } | 297 } |
298 | 298 |
299 } // namespace blink | 299 } // namespace blink |
300 | 300 |
301 #endif // LocalDOMWindow_h | 301 #endif // LocalDOMWindow_h |
OLD | NEW |