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 "core/frame/Frame.h" | 12 #include "core/frame/Frame.h" |
13 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
14 #include "wtf/Assertions.h" | 14 #include "wtf/Assertions.h" |
15 #include "wtf/Forward.h" | 15 #include "wtf/Forward.h" |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class Document; | 19 class Document; |
| 20 class InputDeviceCapabilitiesConstants; |
20 class Location; | 21 class Location; |
21 class LocalDOMWindow; | 22 class LocalDOMWindow; |
22 class MessageEvent; | 23 class MessageEvent; |
23 class SerializedScriptValue; | 24 class SerializedScriptValue; |
24 | 25 |
25 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, | 26 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, |
26 public DOMWindowBase64 { | 27 public DOMWindowBase64 { |
27 DEFINE_WRAPPERTYPEINFO(); | 28 DEFINE_WRAPPERTYPEINFO(); |
28 | 29 |
29 public: | 30 public: |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // when its document is no longer the document that is displayed in its | 95 // when its document is no longer the document that is displayed in its |
95 // frame), we would like to zero out m_frame to avoid being confused | 96 // frame), we would like to zero out m_frame to avoid being confused |
96 // by the document that is currently active in m_frame. | 97 // by the document that is currently active in m_frame. |
97 // See https://bugs.webkit.org/show_bug.cgi?id=62054 | 98 // See https://bugs.webkit.org/show_bug.cgi?id=62054 |
98 bool isCurrentlyDisplayedInFrame() const; | 99 bool isCurrentlyDisplayedInFrame() const; |
99 | 100 |
100 void resetLocation(); | 101 void resetLocation(); |
101 | 102 |
102 bool isSecureContext() const; | 103 bool isSecureContext() const; |
103 | 104 |
| 105 InputDeviceCapabilitiesConstants* getInputDeviceCapabilities(); |
| 106 |
104 protected: | 107 protected: |
105 explicit DOMWindow(Frame&); | 108 explicit DOMWindow(Frame&); |
106 | 109 |
107 virtual void schedulePostMessage(MessageEvent*, | 110 virtual void schedulePostMessage(MessageEvent*, |
108 PassRefPtr<SecurityOrigin> target, | 111 PassRefPtr<SecurityOrigin> target, |
109 Document* source) = 0; | 112 Document* source) = 0; |
110 | 113 |
111 void disconnectFromFrame() { m_frame = nullptr; } | 114 void disconnectFromFrame() { m_frame = nullptr; } |
112 | 115 |
113 private: | 116 private: |
114 Member<Frame> m_frame; | 117 Member<Frame> m_frame; |
| 118 Member<InputDeviceCapabilitiesConstants> m_inputCapabilities; |
115 mutable Member<Location> m_location; | 119 mutable Member<Location> m_location; |
116 | 120 |
117 // Set to true when close() has been called. Needed for | 121 // Set to true when close() has been called. Needed for |
118 // |window.closed| determinism; having it return 'true' | 122 // |window.closed| determinism; having it return 'true' |
119 // only after the layout widget's deferred window close | 123 // only after the layout widget's deferred window close |
120 // operation has been performed, exposes (confusing) | 124 // operation has been performed, exposes (confusing) |
121 // implementation details to scripts. | 125 // implementation details to scripts. |
122 bool m_windowIsClosing; | 126 bool m_windowIsClosing; |
123 | 127 |
124 }; | 128 }; |
125 | 129 |
126 } // namespace blink | 130 } // namespace blink |
127 | 131 |
128 #endif // DOMWindow_h | 132 #endif // DOMWindow_h |
OLD | NEW |