| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class EventListener; | 49 class EventListener; |
| 50 class EventQueue; | 50 class EventQueue; |
| 51 class ExceptionState; | 51 class ExceptionState; |
| 52 class FrameConsole; | 52 class FrameConsole; |
| 53 class IntRect; | 53 class IntRect; |
| 54 class MessageEvent; | 54 class MessageEvent; |
| 55 class Page; | 55 class Page; |
| 56 class PostMessageTimer; | 56 class PostMessageTimer; |
| 57 class SecurityOrigin; | 57 class SecurityOrigin; |
| 58 class SourceLocation; | 58 class SourceLocation; |
| 59 class VisualViewport; | 59 class DOMVisualViewport; |
| 60 | 60 |
| 61 enum PageshowEventPersistence { | 61 enum PageshowEventPersistence { |
| 62 PageshowEventNotPersisted = 0, | 62 PageshowEventNotPersisted = 0, |
| 63 PageshowEventPersisted = 1 | 63 PageshowEventPersisted = 1 |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 // Note: if you're thinking of returning something DOM-related by reference, | 66 // Note: if you're thinking of returning something DOM-related by reference, |
| 67 // please ping dcheng@chromium.org first. You probably don't want to do that. | 67 // please ping dcheng@chromium.org first. You probably don't want to do that. |
| 68 class CORE_EXPORT LocalDOMWindow final : public DOMWindow, public Supplementable
<LocalDOMWindow>, public DOMWindowLifecycleNotifier { | 68 class CORE_EXPORT LocalDOMWindow final : public DOMWindow, public Supplementable
<LocalDOMWindow>, public DOMWindowLifecycleNotifier { |
| 69 USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow); | 69 USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 99 Navigator* navigator() const override; | 99 Navigator* navigator() const override; |
| 100 bool offscreenBuffering() const override; | 100 bool offscreenBuffering() const override; |
| 101 int outerHeight() const override; | 101 int outerHeight() const override; |
| 102 int outerWidth() const override; | 102 int outerWidth() const override; |
| 103 int innerHeight() const override; | 103 int innerHeight() const override; |
| 104 int innerWidth() const override; | 104 int innerWidth() const override; |
| 105 int screenX() const override; | 105 int screenX() const override; |
| 106 int screenY() const override; | 106 int screenY() const override; |
| 107 double scrollX() const override; | 107 double scrollX() const override; |
| 108 double scrollY() const override; | 108 double scrollY() const override; |
| 109 VisualViewport* visualViewport() override; | 109 DOMVisualViewport* visualViewport() override; |
| 110 const AtomicString& name() const override; | 110 const AtomicString& name() const override; |
| 111 void setName(const AtomicString&) override; | 111 void setName(const AtomicString&) override; |
| 112 String status() const override; | 112 String status() const override; |
| 113 void setStatus(const String&) override; | 113 void setStatus(const String&) override; |
| 114 String defaultStatus() const override; | 114 String defaultStatus() const override; |
| 115 void setDefaultStatus(const String&) override; | 115 void setDefaultStatus(const String&) override; |
| 116 Document* document() const override; | 116 Document* document() const override; |
| 117 StyleMedia* styleMedia() const override; | 117 StyleMedia* styleMedia() const override; |
| 118 double devicePixelRatio() const override; | 118 double devicePixelRatio() const override; |
| 119 ApplicationCache* applicationCache() const override; | 119 ApplicationCache* applicationCache() const override; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue>); | 195 void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue>); |
| 196 void dispatchWindowLoadEvent(); | 196 void dispatchWindowLoadEvent(); |
| 197 void documentWasClosed(); | 197 void documentWasClosed(); |
| 198 void statePopped(PassRefPtr<SerializedScriptValue>); | 198 void statePopped(PassRefPtr<SerializedScriptValue>); |
| 199 | 199 |
| 200 // FIXME: This shouldn't be public once LocalDOMWindow becomes ExecutionCont
ext. | 200 // FIXME: This shouldn't be public once LocalDOMWindow becomes ExecutionCont
ext. |
| 201 void clearEventQueue(); | 201 void clearEventQueue(); |
| 202 | 202 |
| 203 void acceptLanguagesChanged(); | 203 void acceptLanguagesChanged(); |
| 204 | 204 |
| 205 FloatSize getViewportSize(IncludeScrollbarsInRect) const; |
| 206 |
| 205 protected: | 207 protected: |
| 206 // EventTarget overrides. | 208 // EventTarget overrides. |
| 207 void addedEventListener(const AtomicString& eventType, RegisteredEventListen
er&) override; | 209 void addedEventListener(const AtomicString& eventType, RegisteredEventListen
er&) override; |
| 208 void removedEventListener(const AtomicString& eventType, const RegisteredEve
ntListener&) override; | 210 void removedEventListener(const AtomicString& eventType, const RegisteredEve
ntListener&) override; |
| 209 | 211 |
| 210 // Protected DOMWindow overrides. | 212 // Protected DOMWindow overrides. |
| 211 void schedulePostMessage(MessageEvent*, PassRefPtr<SecurityOrigin> target, D
ocument* source) override; | 213 void schedulePostMessage(MessageEvent*, PassRefPtr<SecurityOrigin> target, D
ocument* source) override; |
| 212 | 214 |
| 213 private: | 215 private: |
| 214 class WindowFrameObserver; | 216 class WindowFrameObserver; |
| 215 | 217 |
| 216 // Intentionally private to prevent redundant checks when the type is | 218 // Intentionally private to prevent redundant checks when the type is |
| 217 // already LocalDOMWindow. | 219 // already LocalDOMWindow. |
| 218 bool isLocalDOMWindow() const override { return true; } | 220 bool isLocalDOMWindow() const override { return true; } |
| 219 bool isRemoteDOMWindow() const override { return false; } | 221 bool isRemoteDOMWindow() const override { return false; } |
| 220 | 222 |
| 221 explicit LocalDOMWindow(LocalFrame&); | 223 explicit LocalDOMWindow(LocalFrame&); |
| 222 void dispose(); | 224 void dispose(); |
| 223 | 225 |
| 224 void dispatchLoadEvent(); | 226 void dispatchLoadEvent(); |
| 225 void clearDocument(); | 227 void clearDocument(); |
| 226 void willDestroyDocumentInFrame(); | 228 void willDestroyDocumentInFrame(); |
| 227 | 229 |
| 228 void willDetachFrameHost(); | 230 void willDetachFrameHost(); |
| 229 void frameDestroyed(); | 231 void frameDestroyed(); |
| 230 | 232 |
| 231 Member<WindowFrameObserver> m_frameObserver; | 233 Member<WindowFrameObserver> m_frameObserver; |
| 232 Member<Document> m_document; | 234 Member<Document> m_document; |
| 235 Member<DOMVisualViewport> m_visualViewport; |
| 233 | 236 |
| 234 bool m_shouldPrintWhenFinishedLoading; | 237 bool m_shouldPrintWhenFinishedLoading; |
| 235 | 238 |
| 236 HeapHashSet<WeakMember<DOMWindowProperty>> m_properties; | 239 HeapHashSet<WeakMember<DOMWindowProperty>> m_properties; |
| 237 | 240 |
| 238 mutable Member<Screen> m_screen; | 241 mutable Member<Screen> m_screen; |
| 239 mutable Member<History> m_history; | 242 mutable Member<History> m_history; |
| 240 mutable Member<BarProp> m_locationbar; | 243 mutable Member<BarProp> m_locationbar; |
| 241 mutable Member<BarProp> m_menubar; | 244 mutable Member<BarProp> m_menubar; |
| 242 mutable Member<BarProp> m_personalbar; | 245 mutable Member<BarProp> m_personalbar; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 266 } | 269 } |
| 267 | 270 |
| 268 inline String LocalDOMWindow::defaultStatus() const | 271 inline String LocalDOMWindow::defaultStatus() const |
| 269 { | 272 { |
| 270 return m_defaultStatus; | 273 return m_defaultStatus; |
| 271 } | 274 } |
| 272 | 275 |
| 273 } // namespace blink | 276 } // namespace blink |
| 274 | 277 |
| 275 #endif // LocalDOMWindow_h | 278 #endif // LocalDOMWindow_h |
| OLD | NEW |