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" |
(...skipping 23 matching lines...) Expand all Loading... |
34 class LocalDOMWindow; | 34 class LocalDOMWindow; |
35 class MessageEvent; | 35 class MessageEvent; |
36 class MediaQueryList; | 36 class MediaQueryList; |
37 class Navigator; | 37 class Navigator; |
38 class Screen; | 38 class Screen; |
39 class ScriptState; | 39 class ScriptState; |
40 class ScrollToOptions; | 40 class ScrollToOptions; |
41 class SerializedScriptValue; | 41 class SerializedScriptValue; |
42 class Storage; | 42 class Storage; |
43 class StyleMedia; | 43 class StyleMedia; |
| 44 class VisualViewport; |
44 | 45 |
45 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public DOMWindow
Base64 { | 46 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public DOMWindow
Base64 { |
46 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
47 public: | 48 public: |
48 ~DOMWindow() override; | 49 ~DOMWindow() override; |
49 | 50 |
50 // GarbageCollectedFinalized overrides: | 51 // GarbageCollectedFinalized overrides: |
51 DECLARE_VIRTUAL_TRACE(); | 52 DECLARE_VIRTUAL_TRACE(); |
52 | 53 |
53 virtual bool isLocalDOMWindow() const = 0; | 54 virtual bool isLocalDOMWindow() const = 0; |
(...skipping 30 matching lines...) Expand all Loading... |
84 virtual int innerWidth() const = 0; | 85 virtual int innerWidth() const = 0; |
85 virtual int screenX() const = 0; | 86 virtual int screenX() const = 0; |
86 virtual int screenY() const = 0; | 87 virtual int screenY() const = 0; |
87 int screenLeft() const { return screenX(); } | 88 int screenLeft() const { return screenX(); } |
88 int screenTop() const { return screenY(); } | 89 int screenTop() const { return screenY(); } |
89 virtual double scrollX() const = 0; | 90 virtual double scrollX() const = 0; |
90 virtual double scrollY() const = 0; | 91 virtual double scrollY() const = 0; |
91 double pageXOffset() const { return scrollX(); } | 92 double pageXOffset() const { return scrollX(); } |
92 double pageYOffset() const { return scrollY(); } | 93 double pageYOffset() const { return scrollY(); } |
93 | 94 |
| 95 virtual VisualViewport* visualViewport() { return nullptr; } |
| 96 |
94 bool closed() const; | 97 bool closed() const; |
95 | 98 |
96 // 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 |
97 // Blink, it's currently marked as DoNotCheckSecurity. | 100 // Blink, it's currently marked as DoNotCheckSecurity. |
98 unsigned length() const; | 101 unsigned length() const; |
99 | 102 |
100 virtual const AtomicString& name() const = 0; | 103 virtual const AtomicString& name() const = 0; |
101 virtual void setName(const AtomicString&) = 0; | 104 virtual void setName(const AtomicString&) = 0; |
102 | 105 |
103 virtual String status() const = 0; | 106 virtual String status() const = 0; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // implementation details to scripts. | 230 // implementation details to scripts. |
228 bool m_windowIsClosing; | 231 bool m_windowIsClosing; |
229 | 232 |
230 private: | 233 private: |
231 mutable Member<Location> m_location; | 234 mutable Member<Location> m_location; |
232 }; | 235 }; |
233 | 236 |
234 } // namespace blink | 237 } // namespace blink |
235 | 238 |
236 #endif // DOMWindow_h | 239 #endif // DOMWindow_h |
OLD | NEW |