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

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

Issue 2816743002: v8binding: Implements an alternative of WindowProxy.[[DefineOwnProperty]]. (Closed)
Patch Set: Fixed tests. Created 3 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 "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 "platform/wtf/Assertions.h" 14 #include "platform/wtf/Assertions.h"
15 #include "platform/wtf/Forward.h" 15 #include "platform/wtf/Forward.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class Document; 19 class Document;
20 class InputDeviceCapabilitiesConstants; 20 class InputDeviceCapabilitiesConstants;
21 class LocalDOMWindow;
21 class Location; 22 class Location;
22 class LocalDOMWindow;
23 class MessageEvent; 23 class MessageEvent;
24 class ScriptValue;
24 class SerializedScriptValue; 25 class SerializedScriptValue;
25 26
26 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData, 27 class CORE_EXPORT DOMWindow : public EventTargetWithInlineData,
27 public DOMWindowBase64 { 28 public DOMWindowBase64 {
28 DEFINE_WRAPPERTYPEINFO(); 29 DEFINE_WRAPPERTYPEINFO();
29 30
30 public: 31 public:
31 ~DOMWindow() override; 32 ~DOMWindow() override;
32 33
33 Frame* GetFrame() const { 34 Frame* GetFrame() const {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 DOMWindow* frames() const { return self(); } 76 DOMWindow* frames() const { return self(); }
76 77
77 DOMWindow* opener() const; 78 DOMWindow* opener() const;
78 DOMWindow* parent() const; 79 DOMWindow* parent() const;
79 DOMWindow* top() const; 80 DOMWindow* top() const;
80 81
81 void focus(ExecutionContext*); 82 void focus(ExecutionContext*);
82 virtual void blur() = 0; 83 virtual void blur() = 0;
83 void close(ExecutionContext*); 84 void close(ExecutionContext*);
84 85
85 // FIXME: This handles both window[index] and window.frames[index]. However, 86 // Indexed properties
haraken 2017/04/14 18:50:06 Did you remove this comment because it's out-dated
Yuki 2017/04/17 05:30:31 Yes, the comment is out-dated and no longer correc
86 // the spec exposes window.frames[index] across origins but not 87 DOMWindow* AnonymousIndexedGetter(uint32_t index) const;
87 // window[index]... 88 bool AnonymousIndexedSetter(uint32_t index, const ScriptValue&);
88 DOMWindow* AnonymousIndexedGetter(uint32_t) const;
89 89
90 void postMessage(PassRefPtr<SerializedScriptValue> message, 90 void postMessage(PassRefPtr<SerializedScriptValue> message,
91 const MessagePortArray&, 91 const MessagePortArray&,
92 const String& target_origin, 92 const String& target_origin,
93 LocalDOMWindow* source, 93 LocalDOMWindow* source,
94 ExceptionState&); 94 ExceptionState&);
95 95
96 String SanitizedCrossDomainAccessErrorMessage( 96 String SanitizedCrossDomainAccessErrorMessage(
97 const LocalDOMWindow* calling_window) const; 97 const LocalDOMWindow* calling_window) const;
98 String CrossDomainAccessErrorMessage( 98 String CrossDomainAccessErrorMessage(
(...skipping 29 matching lines...) Expand all
128 // |window.closed| determinism; having it return 'true' 128 // |window.closed| determinism; having it return 'true'
129 // only after the layout widget's deferred window close 129 // only after the layout widget's deferred window close
130 // operation has been performed, exposes (confusing) 130 // operation has been performed, exposes (confusing)
131 // implementation details to scripts. 131 // implementation details to scripts.
132 bool window_is_closing_; 132 bool window_is_closing_;
133 }; 133 };
134 134
135 } // namespace blink 135 } // namespace blink
136 136
137 #endif // DOMWindow_h 137 #endif // DOMWindow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698