| 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 "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
| 10 #include "core/frame/DOMWindowBase64.h" | 10 #include "core/frame/DOMWindowBase64.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class MediaQueryList; | 34 class MediaQueryList; |
| 35 class Navigator; | 35 class Navigator; |
| 36 class Screen; | 36 class Screen; |
| 37 class ScrollToOptions; | 37 class ScrollToOptions; |
| 38 class SerializedScriptValue; | 38 class SerializedScriptValue; |
| 39 class Storage; | 39 class Storage; |
| 40 class StyleMedia; | 40 class StyleMedia; |
| 41 | 41 |
| 42 typedef HeapVector<Member<MessagePort>, 1> MessagePortArray; | 42 typedef HeapVector<Member<MessagePort>, 1> MessagePortArray; |
| 43 | 43 |
| 44 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public RefCounte
dWillBeNoBase<DOMWindow>, public DOMWindowBase64 { | 44 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public DOMWindow
Base64 { |
| 45 DEFINE_WRAPPERTYPEINFO(); | 45 DEFINE_WRAPPERTYPEINFO(); |
| 46 REFCOUNTED_EVENT_TARGET(DOMWindow); | 46 REFCOUNTED_EVENT_TARGET(DOMWindow); |
| 47 public: | 47 public: |
| 48 ~DOMWindow() override; | 48 ~DOMWindow() override; |
| 49 | 49 |
| 50 // RefCountedWillBeGarbageCollectedFinalized overrides: | 50 // GarbageCollectedFinalized overrides: |
| 51 DECLARE_VIRTUAL_TRACE(); | 51 DECLARE_VIRTUAL_TRACE(); |
| 52 | 52 |
| 53 virtual bool isLocalDOMWindow() const { return false; } | 53 virtual bool isLocalDOMWindow() const { return false; } |
| 54 virtual bool isRemoteDOMWindow() const { return false; } | 54 virtual bool isRemoteDOMWindow() const { return false; } |
| 55 | 55 |
| 56 virtual Frame* frame() const = 0; | 56 virtual Frame* frame() const = 0; |
| 57 | 57 |
| 58 // ScriptWrappable overrides: | 58 // ScriptWrappable overrides: |
| 59 v8::Local<v8::Object> wrap(v8::Isolate*, v8::Local<v8::Object> creationConte
xt) final; | 59 v8::Local<v8::Object> wrap(v8::Isolate*, v8::Local<v8::Object> creationConte
xt) final; |
| 60 v8::Local<v8::Object> associateWithWrapper(v8::Isolate*, const WrapperTypeIn
fo*, v8::Local<v8::Object> wrapper) final; | 60 v8::Local<v8::Object> associateWithWrapper(v8::Isolate*, const WrapperTypeIn
fo*, v8::Local<v8::Object> wrapper) final; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 virtual void scrollTo(double x, double y) const = 0; | 150 virtual void scrollTo(double x, double y) const = 0; |
| 151 virtual void scrollTo(const ScrollToOptions&) const = 0; | 151 virtual void scrollTo(const ScrollToOptions&) const = 0; |
| 152 void scroll(double x, double y) const { scrollTo(x, y); } | 152 void scroll(double x, double y) const { scrollTo(x, y); } |
| 153 void scroll(const ScrollToOptions& scrollToOptions) const { scrollTo(scrollT
oOptions); } | 153 void scroll(const ScrollToOptions& scrollToOptions) const { scrollTo(scrollT
oOptions); } |
| 154 virtual void moveBy(int x, int y) const = 0; | 154 virtual void moveBy(int x, int y) const = 0; |
| 155 virtual void moveTo(int x, int y) const = 0; | 155 virtual void moveTo(int x, int y) const = 0; |
| 156 | 156 |
| 157 virtual void resizeBy(int x, int y) const = 0; | 157 virtual void resizeBy(int x, int y) const = 0; |
| 158 virtual void resizeTo(int width, int height) const = 0; | 158 virtual void resizeTo(int width, int height) const = 0; |
| 159 | 159 |
| 160 virtual PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&) = 0
; | 160 virtual RawPtr<MediaQueryList> matchMedia(const String&) = 0; |
| 161 | 161 |
| 162 // DOM Level 2 Style Interface | 162 // DOM Level 2 Style Interface |
| 163 virtual PassRefPtrWillBeRawPtr<CSSStyleDeclaration> getComputedStyle(Element
*, const String& pseudoElt) const = 0; | 163 virtual RawPtr<CSSStyleDeclaration> getComputedStyle(Element*, const String&
pseudoElt) const = 0; |
| 164 | 164 |
| 165 // WebKit extensions | 165 // WebKit extensions |
| 166 virtual PassRefPtrWillBeRawPtr<CSSRuleList> getMatchedCSSRules(Element*, con
st String& pseudoElt) const = 0; | 166 virtual RawPtr<CSSRuleList> getMatchedCSSRules(Element*, const String& pseud
oElt) const = 0; |
| 167 | 167 |
| 168 // WebKit animation extensions | 168 // WebKit animation extensions |
| 169 virtual int requestAnimationFrame(FrameRequestCallback*) = 0; | 169 virtual int requestAnimationFrame(FrameRequestCallback*) = 0; |
| 170 virtual int webkitRequestAnimationFrame(FrameRequestCallback*) = 0; | 170 virtual int webkitRequestAnimationFrame(FrameRequestCallback*) = 0; |
| 171 virtual void cancelAnimationFrame(int id) = 0; | 171 virtual void cancelAnimationFrame(int id) = 0; |
| 172 | 172 |
| 173 // Idle callback extensions | 173 // Idle callback extensions |
| 174 virtual int requestIdleCallback(IdleRequestCallback*, const IdleRequestOptio
ns&) = 0; | 174 virtual int requestIdleCallback(IdleRequestCallback*, const IdleRequestOptio
ns&) = 0; |
| 175 virtual void cancelIdleCallback(int id) = 0; | 175 virtual void cancelIdleCallback(int id) = 0; |
| 176 | 176 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 DOMWindow(); | 217 DOMWindow(); |
| 218 | 218 |
| 219 // Set to true when close() has been called. Needed for | 219 // Set to true when close() has been called. Needed for |
| 220 // |window.closed| determinism; having it return 'true' | 220 // |window.closed| determinism; having it return 'true' |
| 221 // only after the layout widget's deferred window close | 221 // only after the layout widget's deferred window close |
| 222 // operation has been performed, exposes (confusing) | 222 // operation has been performed, exposes (confusing) |
| 223 // implementation details to scripts. | 223 // implementation details to scripts. |
| 224 bool m_windowIsClosing; | 224 bool m_windowIsClosing; |
| 225 | 225 |
| 226 private: | 226 private: |
| 227 mutable RefPtrWillBeMember<Location> m_location; | 227 mutable Member<Location> m_location; |
| 228 }; | 228 }; |
| 229 | 229 |
| 230 } // namespace blink | 230 } // namespace blink |
| 231 | 231 |
| 232 #endif // DOMWindow_h | 232 #endif // DOMWindow_h |
| OLD | NEW |