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/events/EventTarget.h" | 8 #include "core/events/EventTarget.h" |
9 #include "core/frame/DOMWindowBase64.h" | 9 #include "core/frame/DOMWindowBase64.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 virtual String prompt(const String& message, const String& defaultValue) = 0 ; | 141 virtual String prompt(const String& message, const String& defaultValue) = 0 ; |
142 | 142 |
143 virtual bool find(const String&, bool caseSensitive, bool backwards, bool wr ap, bool wholeWord, bool searchInFrames, bool showDialog) const = 0; | 143 virtual bool find(const String&, bool caseSensitive, bool backwards, bool wr ap, bool wholeWord, bool searchInFrames, bool showDialog) const = 0; |
144 | 144 |
145 virtual void scrollBy(double x, double y, ScrollBehavior = ScrollBehaviorAut o) const = 0; | 145 virtual void scrollBy(double x, double y, ScrollBehavior = ScrollBehaviorAut o) const = 0; |
146 virtual void scrollBy(const ScrollToOptions&) const = 0; | 146 virtual void scrollBy(const ScrollToOptions&) const = 0; |
147 virtual void scrollTo(double x, double y) const = 0; | 147 virtual void scrollTo(double x, double y) const = 0; |
148 virtual void scrollTo(const ScrollToOptions&) const = 0; | 148 virtual void scrollTo(const ScrollToOptions&) const = 0; |
149 void scroll(double x, double y) const { scrollTo(x, y); } | 149 void scroll(double x, double y) const { scrollTo(x, y); } |
150 void scroll(const ScrollToOptions& scrollToOptions) const { scrollTo(scrollT oOptions); } | 150 void scroll(const ScrollToOptions& scrollToOptions) const { scrollTo(scrollT oOptions); } |
151 virtual void moveBy(float x, float y) const = 0; | 151 virtual void moveBy(int x, int y) const = 0; |
152 virtual void moveTo(float x, float y) const = 0; | 152 void moveTo() const { moveTo(0, 0, false, false); } |
153 void moveTo(int x) const { moveTo(x, 0, true, false); } | |
154 virtual void moveTo(int x, int y, bool hasX = true, bool hasY = true) const = 0; | |
Mike West
2015/01/28 13:33:17
This is really strange. :/
Jens Widell
2015/01/28 14:09:23
This is simply to differentiate between "missing"
| |
153 | 155 |
154 virtual void resizeBy(float x, float y) const = 0; | 156 virtual void resizeBy(int x, int y) const = 0; |
155 virtual void resizeTo(float width, float height) const = 0; | 157 void resizeTo() const { resizeTo(0, 0, false, false); } |
158 void resizeTo(int x) const { resizeTo(x, 0, true, false); } | |
159 virtual void resizeTo(int width, int height, bool hasWidth = true, bool hasH eight = true) const = 0; | |
156 | 160 |
157 virtual PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&) = 0 ; | 161 virtual PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&) = 0 ; |
158 | 162 |
159 // DOM Level 2 Style Interface | 163 // DOM Level 2 Style Interface |
160 virtual PassRefPtrWillBeRawPtr<CSSStyleDeclaration> getComputedStyle(Element *, const String& pseudoElt) const = 0; | 164 virtual PassRefPtrWillBeRawPtr<CSSStyleDeclaration> getComputedStyle(Element *, const String& pseudoElt) const = 0; |
161 | 165 |
162 // WebKit extensions | 166 // WebKit extensions |
163 virtual PassRefPtrWillBeRawPtr<CSSRuleList> getMatchedCSSRules(Element*, con st String& pseudoElt) const = 0; | 167 virtual PassRefPtrWillBeRawPtr<CSSRuleList> getMatchedCSSRules(Element*, con st String& pseudoElt) const = 0; |
164 | 168 |
165 // WebKit animation extensions | 169 // WebKit animation extensions |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 DEFINE_ATTRIBUTE_EVENT_LISTENER(orientationchange); | 209 DEFINE_ATTRIBUTE_EVENT_LISTENER(orientationchange); |
206 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchstart); | 210 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchstart); |
207 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove); | 211 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove); |
208 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend); | 212 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend); |
209 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel); | 213 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel); |
210 }; | 214 }; |
211 | 215 |
212 } // namespace blink | 216 } // namespace blink |
213 | 217 |
214 #endif // DOMWindow_h | 218 #endif // DOMWindow_h |
OLD | NEW |