| 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/Transferables.h" | 8 #include "bindings/core/v8/Transferables.h" |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| 11 #include "core/frame/DOMWindowBase64.h" | 11 #include "core/frame/DOMWindowBase64.h" |
| 12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
| 13 #include "platform/scroll/ScrollableArea.h" | 13 #include "platform/scroll/ScrollableArea.h" |
| 14 | 14 |
| 15 #include "wtf/Forward.h" | 15 #include "wtf/Forward.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 class ApplicationCache; | 19 class ApplicationCache; |
| 20 class BarProp; | 20 class BarProp; |
| 21 class CSSRuleList; | 21 class CSSRuleList; |
| 22 class CSSStyleDeclaration; | 22 class CSSStyleDeclaration; |
| 23 class CustomElementsRegistry; | 23 class CustomElementsRegistry; |
| 24 class DOMSelection; | 24 class DOMSelection; |
| 25 class DOMVisualViewport; |
| 25 class DOMWindowCSS; | 26 class DOMWindowCSS; |
| 26 class Document; | 27 class Document; |
| 27 class Element; | 28 class Element; |
| 28 class Frame; | 29 class Frame; |
| 29 class FrameRequestCallback; | 30 class FrameRequestCallback; |
| 30 class History; | 31 class History; |
| 31 class IdleRequestCallback; | 32 class IdleRequestCallback; |
| 32 class IdleRequestOptions; | 33 class IdleRequestOptions; |
| 33 class Location; | 34 class Location; |
| 34 class LocalDOMWindow; | 35 class LocalDOMWindow; |
| 35 class MessageEvent; | 36 class MessageEvent; |
| 36 class MediaQueryList; | 37 class MediaQueryList; |
| 37 class Navigator; | 38 class Navigator; |
| 38 class Screen; | 39 class Screen; |
| 39 class ScriptState; | 40 class ScriptState; |
| 40 class ScrollToOptions; | 41 class ScrollToOptions; |
| 41 class SerializedScriptValue; | 42 class SerializedScriptValue; |
| 42 class Storage; | 43 class Storage; |
| 43 class StyleMedia; | 44 class StyleMedia; |
| 44 class VisualViewport; | |
| 45 | 45 |
| 46 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public DOMWindow
Base64 { | 46 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public DOMWindow
Base64 { |
| 47 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
| 48 public: | 48 public: |
| 49 ~DOMWindow() override; | 49 ~DOMWindow() override; |
| 50 | 50 |
| 51 // GarbageCollectedFinalized overrides: | 51 // GarbageCollectedFinalized overrides: |
| 52 DECLARE_VIRTUAL_TRACE(); | 52 DECLARE_VIRTUAL_TRACE(); |
| 53 | 53 |
| 54 virtual bool isLocalDOMWindow() const = 0; | 54 virtual bool isLocalDOMWindow() const = 0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 85 virtual int innerWidth() const = 0; | 85 virtual int innerWidth() const = 0; |
| 86 virtual int screenX() const = 0; | 86 virtual int screenX() const = 0; |
| 87 virtual int screenY() const = 0; | 87 virtual int screenY() const = 0; |
| 88 int screenLeft() const { return screenX(); } | 88 int screenLeft() const { return screenX(); } |
| 89 int screenTop() const { return screenY(); } | 89 int screenTop() const { return screenY(); } |
| 90 virtual double scrollX() const = 0; | 90 virtual double scrollX() const = 0; |
| 91 virtual double scrollY() const = 0; | 91 virtual double scrollY() const = 0; |
| 92 double pageXOffset() const { return scrollX(); } | 92 double pageXOffset() const { return scrollX(); } |
| 93 double pageYOffset() const { return scrollY(); } | 93 double pageYOffset() const { return scrollY(); } |
| 94 | 94 |
| 95 virtual VisualViewport* visualViewport() { return nullptr; } | 95 virtual DOMVisualViewport* visualViewport() { return nullptr; } |
| 96 | 96 |
| 97 bool closed() const; | 97 bool closed() const; |
| 98 | 98 |
| 99 // FIXME: This is not listed as a cross-origin accessible attribute, but in | 99 // FIXME: This is not listed as a cross-origin accessible attribute, but in |
| 100 // Blink, it's currently marked as DoNotCheckSecurity. | 100 // Blink, it's currently marked as DoNotCheckSecurity. |
| 101 unsigned length() const; | 101 unsigned length() const; |
| 102 | 102 |
| 103 virtual const AtomicString& name() const = 0; | 103 virtual const AtomicString& name() const = 0; |
| 104 virtual void setName(const AtomicString&) = 0; | 104 virtual void setName(const AtomicString&) = 0; |
| 105 | 105 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // implementation details to scripts. | 230 // implementation details to scripts. |
| 231 bool m_windowIsClosing; | 231 bool m_windowIsClosing; |
| 232 | 232 |
| 233 private: | 233 private: |
| 234 mutable Member<Location> m_location; | 234 mutable Member<Location> m_location; |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 } // namespace blink | 237 } // namespace blink |
| 238 | 238 |
| 239 #endif // DOMWindow_h | 239 #endif // DOMWindow_h |
| OLD | NEW |