Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: Source/core/frame/DOMWindow.h

Issue 683013002: Extract a DOMWindow interface from LocalDOMWindow and use it in the idl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on top of DOMWindow moves and UseCounter overload for Frame Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "platform/scroll/ScrollableArea.h" 11 #include "platform/scroll/ScrollableArea.h"
12 12
13 #include "wtf/Forward.h" 13 #include "wtf/Forward.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class ApplicationCache; 17 class ApplicationCache;
18 class BarProp; 18 class BarProp;
19 class CSSRuleList; 19 class CSSRuleList;
20 class CSSStyleDeclaration; 20 class CSSStyleDeclaration;
21 class Console; 21 class Console;
22 class DOMSelection; 22 class DOMSelection;
23 class DOMWindowCSS; 23 class DOMWindowCSS;
24 class Document; 24 class Document;
25 class Element; 25 class Element;
26 class Frame; 26 class Frame;
27 class History; 27 class History;
28 class LocalDOMWindow;
28 class Location; 29 class Location;
29 class MediaQueryList; 30 class MediaQueryList;
30 class Navigator; 31 class Navigator;
31 class Performance; 32 class Performance;
32 class RequestAnimationFrameCallback; 33 class RequestAnimationFrameCallback;
33 class Screen; 34 class Screen;
34 class ScrollOptions; 35 class ScrollOptions;
35 class SerializedScriptValue; 36 class SerializedScriptValue;
36 class Storage; 37 class Storage;
37 class StyleMedia; 38 class StyleMedia;
38 39
39 typedef WillBeHeapVector<RefPtrWillBeMember<MessagePort>, 1> MessagePortArray; 40 typedef WillBeHeapVector<RefPtrWillBeMember<MessagePort>, 1> MessagePortArray;
40 41
41 class DOMWindow : public RefCountedWillBeGarbageCollectedFinalized<DOMWindow>, p ublic EventTargetWithInlineData, public DOMWindowBase64 { 42 class DOMWindow : public RefCountedWillBeGarbageCollectedFinalized<DOMWindow>, p ublic EventTargetWithInlineData, public DOMWindowBase64 {
43 DEFINE_WRAPPERTYPEINFO();
42 REFCOUNTED_EVENT_TARGET(DOMWindow); 44 REFCOUNTED_EVENT_TARGET(DOMWindow);
43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMWindow); 45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMWindow);
44 public: 46 public:
45 // RefCountedWillBeGarbageCollectedFinalized overrides: 47 // RefCountedWillBeGarbageCollectedFinalized overrides:
46 void trace(Visitor* visitor) override 48 void trace(Visitor* visitor) override
47 { 49 {
48 EventTargetWithInlineData::trace(visitor); 50 EventTargetWithInlineData::trace(visitor);
49 } 51 }
50 52
51 virtual bool isLocalDOMWindow() const { return false; } 53 virtual bool isLocalDOMWindow() const { return false; }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 virtual PassRefPtrWillBeRawPtr<CSSRuleList> getMatchedCSSRules(Element*, con st String& pseudoElt) const = 0; 163 virtual PassRefPtrWillBeRawPtr<CSSRuleList> getMatchedCSSRules(Element*, con st String& pseudoElt) const = 0;
162 164
163 // WebKit animation extensions 165 // WebKit animation extensions
164 virtual int requestAnimationFrame(RequestAnimationFrameCallback*) = 0; 166 virtual int requestAnimationFrame(RequestAnimationFrameCallback*) = 0;
165 virtual int webkitRequestAnimationFrame(RequestAnimationFrameCallback*) = 0; 167 virtual int webkitRequestAnimationFrame(RequestAnimationFrameCallback*) = 0;
166 virtual void cancelAnimationFrame(int id) = 0; 168 virtual void cancelAnimationFrame(int id) = 0;
167 169
168 void captureEvents() { } 170 void captureEvents() { }
169 void releaseEvents() { } 171 void releaseEvents() { }
170 172
171 // FIXME: Should this be returning DOMWindows? 173 virtual DOMWindow* anonymousIndexedGetter(uint32_t) = 0;
172 virtual LocalDOMWindow* anonymousIndexedGetter(uint32_t) = 0;
173 174
174 virtual void postMessage(PassRefPtr<SerializedScriptValue> message, const Me ssagePortArray*, const String& targetOrigin, LocalDOMWindow* source, ExceptionSt ate&) = 0; 175 virtual void postMessage(PassRefPtr<SerializedScriptValue> message, const Me ssagePortArray*, const String& targetOrigin, LocalDOMWindow* source, ExceptionSt ate&) = 0;
175 176
177 // FIXME: These should be non-virtual, but this is blocked on the security
178 // origin replication work.
179 virtual String sanitizedCrossDomainAccessErrorMessage(LocalDOMWindow* callin gWindow) = 0;
180 virtual String crossDomainAccessErrorMessage(LocalDOMWindow* callingWindow) = 0;
181
176 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationend); 182 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationend);
177 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationiteration); 183 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationiteration);
178 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationstart); 184 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationstart);
179 DEFINE_ATTRIBUTE_EVENT_LISTENER(search); 185 DEFINE_ATTRIBUTE_EVENT_LISTENER(search);
180 DEFINE_ATTRIBUTE_EVENT_LISTENER(transitionend); 186 DEFINE_ATTRIBUTE_EVENT_LISTENER(transitionend);
181 DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel); 187 DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel);
182 188
183 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationstart, webkitAnimation Start); 189 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationstart, webkitAnimation Start);
184 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationiteration, webkitAnima tionIteration); 190 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationiteration, webkitAnima tionIteration);
185 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationend, webkitAnimationEn d); 191 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationend, webkitAnimationEn d);
186 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkittransitionend, webkitTransition End); 192 DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkittransitionend, webkitTransition End);
187 193
188 DEFINE_ATTRIBUTE_EVENT_LISTENER(orientationchange); 194 DEFINE_ATTRIBUTE_EVENT_LISTENER(orientationchange);
189 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchstart); 195 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchstart);
190 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove); 196 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove);
191 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend); 197 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend);
192 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel); 198 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel);
193 }; 199 };
194 200
195 } // namespace blink 201 } // namespace blink
196 202
197 #endif // DOMWindow_h 203 #endif // DOMWindow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698