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

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

Issue 1893983002: Simplify handling of Transferable objects while (de)serializing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove Transferable.cpp, not needed after all. Created 4 years, 8 months 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
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 "bindings/core/v8/Transferables.h"
8 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
9 #include "core/events/EventTarget.h" 10 #include "core/events/EventTarget.h"
10 #include "core/frame/DOMWindowBase64.h" 11 #include "core/frame/DOMWindowBase64.h"
11 #include "core/frame/Location.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 #include "platform/scroll/ScrollableArea.h" 13 #include "platform/scroll/ScrollableArea.h"
14 14
15 #include "wtf/Forward.h" 15 #include "wtf/Forward.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class ApplicationCache; 19 class ApplicationCache;
20 class BarProp; 20 class BarProp;
21 class CSSRuleList; 21 class CSSRuleList;
22 class CSSStyleDeclaration; 22 class CSSStyleDeclaration;
23 class Console; 23 class Console;
24 class CustomElementsRegistry; 24 class CustomElementsRegistry;
25 class DOMSelection; 25 class DOMSelection;
26 class DOMWindowCSS; 26 class DOMWindowCSS;
27 class Document; 27 class Document;
28 class Element; 28 class Element;
29 class Frame; 29 class Frame;
30 class FrameRequestCallback; 30 class FrameRequestCallback;
31 class History; 31 class History;
32 class IdleRequestCallback; 32 class IdleRequestCallback;
33 class IdleRequestOptions; 33 class IdleRequestOptions;
34 class Location;
34 class LocalDOMWindow; 35 class LocalDOMWindow;
35 class MediaQueryList; 36 class MediaQueryList;
36 class Navigator; 37 class Navigator;
37 class Screen; 38 class Screen;
38 class ScrollToOptions; 39 class ScrollToOptions;
39 class SerializedScriptValue; 40 class SerializedScriptValue;
40 class Storage; 41 class Storage;
41 class StyleMedia; 42 class StyleMedia;
42 43
43 typedef HeapVector<Member<MessagePort>, 1> MessagePortArray;
44
45 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public DOMWindow Base64 { 44 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, public DOMWindow Base64 {
46 DEFINE_WRAPPERTYPEINFO(); 45 DEFINE_WRAPPERTYPEINFO();
47 public: 46 public:
48 ~DOMWindow() override; 47 ~DOMWindow() override;
49 48
50 // GarbageCollectedFinalized overrides: 49 // GarbageCollectedFinalized overrides:
51 DECLARE_VIRTUAL_TRACE(); 50 DECLARE_VIRTUAL_TRACE();
52 51
53 virtual bool isLocalDOMWindow() const { return false; } 52 virtual bool isLocalDOMWindow() const { return false; }
54 virtual bool isRemoteDOMWindow() const { return false; } 53 virtual bool isRemoteDOMWindow() const { return false; }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 virtual CustomElementsRegistry* customElements() const = 0; 177 virtual CustomElementsRegistry* customElements() const = 0;
179 178
180 void captureEvents() { } 179 void captureEvents() { }
181 void releaseEvents() { } 180 void releaseEvents() { }
182 181
183 // FIXME: This handles both window[index] and window.frames[index]. However, 182 // FIXME: This handles both window[index] and window.frames[index]. However,
184 // the spec exposes window.frames[index] across origins but not 183 // the spec exposes window.frames[index] across origins but not
185 // window[index]... 184 // window[index]...
186 DOMWindow* anonymousIndexedGetter(uint32_t) const; 185 DOMWindow* anonymousIndexedGetter(uint32_t) const;
187 186
188 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, const String& targetOrigin, LocalDOMWindow* source, ExceptionState&); 187 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray&, const String& targetOrigin, LocalDOMWindow* source, ExceptionState&);
189 188
190 String sanitizedCrossDomainAccessErrorMessage(const LocalDOMWindow* callingW indow) const; 189 String sanitizedCrossDomainAccessErrorMessage(const LocalDOMWindow* callingW indow) const;
191 String crossDomainAccessErrorMessage(const LocalDOMWindow* callingWindow) co nst; 190 String crossDomainAccessErrorMessage(const LocalDOMWindow* callingWindow) co nst;
192 bool isInsecureScriptAccess(LocalDOMWindow& callingWindow, const String& url String); 191 bool isInsecureScriptAccess(LocalDOMWindow& callingWindow, const String& url String);
193 192
194 // FIXME: When this DOMWindow is no longer the active DOMWindow (i.e., 193 // FIXME: When this DOMWindow is no longer the active DOMWindow (i.e.,
195 // when its document is no longer the document that is displayed in its 194 // when its document is no longer the document that is displayed in its
196 // frame), we would like to zero out m_frame to avoid being confused 195 // frame), we would like to zero out m_frame to avoid being confused
197 // by the document that is currently active in m_frame. 196 // by the document that is currently active in m_frame.
198 // See https://bugs.webkit.org/show_bug.cgi?id=62054 197 // See https://bugs.webkit.org/show_bug.cgi?id=62054
(...skipping 27 matching lines...) Expand all
226 // implementation details to scripts. 225 // implementation details to scripts.
227 bool m_windowIsClosing; 226 bool m_windowIsClosing;
228 227
229 private: 228 private:
230 mutable Member<Location> m_location; 229 mutable Member<Location> m_location;
231 }; 230 };
232 231
233 } // namespace blink 232 } // namespace blink
234 233
235 #endif // DOMWindow_h 234 #endif // DOMWindow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698