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

Side by Side Diff: third_party/WebKit/Source/core/frame/RemoteDOMWindow.cpp

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)
Patch Set: Rebase and address comments. Created 3 years, 10 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 #include "core/frame/RemoteDOMWindow.h" 5 #include "core/frame/RemoteDOMWindow.h"
6 6
7 #include "bindings/core/v8/SerializedScriptValue.h"
8 #include "core/css/CSSRuleList.h"
9 #include "core/css/CSSStyleDeclaration.h"
10 #include "core/css/MediaQueryList.h"
11 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
12 #include "core/frame/RemoteFrameClient.h" 8 #include "core/frame/RemoteFrameClient.h"
13 9
14 namespace blink { 10 namespace blink {
15 11
16 ExecutionContext* RemoteDOMWindow::getExecutionContext() const { 12 ExecutionContext* RemoteDOMWindow::getExecutionContext() const {
17 return nullptr; 13 return nullptr;
18 } 14 }
19 15
20 DEFINE_TRACE(RemoteDOMWindow) { 16 DEFINE_TRACE(RemoteDOMWindow) {
21 DOMWindow::trace(visitor); 17 DOMWindow::trace(visitor);
22 } 18 }
23 19
24 Screen* RemoteDOMWindow::screen() const {
25 ASSERT_NOT_REACHED();
26 return nullptr;
27 }
28
29 History* RemoteDOMWindow::history() const {
30 ASSERT_NOT_REACHED();
31 return nullptr;
32 }
33
34 BarProp* RemoteDOMWindow::locationbar() const {
35 ASSERT_NOT_REACHED();
36 return nullptr;
37 }
38
39 BarProp* RemoteDOMWindow::menubar() const {
40 ASSERT_NOT_REACHED();
41 return nullptr;
42 }
43
44 BarProp* RemoteDOMWindow::personalbar() const {
45 ASSERT_NOT_REACHED();
46 return nullptr;
47 }
48
49 BarProp* RemoteDOMWindow::scrollbars() const {
50 ASSERT_NOT_REACHED();
51 return nullptr;
52 }
53
54 BarProp* RemoteDOMWindow::statusbar() const {
55 ASSERT_NOT_REACHED();
56 return nullptr;
57 }
58
59 BarProp* RemoteDOMWindow::toolbar() const {
60 ASSERT_NOT_REACHED();
61 return nullptr;
62 }
63
64 Navigator* RemoteDOMWindow::navigator() const {
65 ASSERT_NOT_REACHED();
66 return nullptr;
67 }
68
69 bool RemoteDOMWindow::offscreenBuffering() const {
70 ASSERT_NOT_REACHED();
71 return false;
72 }
73
74 int RemoteDOMWindow::outerHeight() const {
75 ASSERT_NOT_REACHED();
76 return 0;
77 }
78
79 int RemoteDOMWindow::outerWidth() const {
80 ASSERT_NOT_REACHED();
81 return 0;
82 }
83
84 int RemoteDOMWindow::innerHeight() const {
85 ASSERT_NOT_REACHED();
86 return 0;
87 }
88
89 int RemoteDOMWindow::innerWidth() const {
90 ASSERT_NOT_REACHED();
91 return 0;
92 }
93
94 int RemoteDOMWindow::screenX() const {
95 ASSERT_NOT_REACHED();
96 return 0;
97 }
98
99 int RemoteDOMWindow::screenY() const {
100 ASSERT_NOT_REACHED();
101 return 0;
102 }
103
104 double RemoteDOMWindow::scrollX() const {
105 ASSERT_NOT_REACHED();
106 return 0.0;
107 }
108
109 double RemoteDOMWindow::scrollY() const {
110 ASSERT_NOT_REACHED();
111 return 0.0;
112 }
113
114 const AtomicString& RemoteDOMWindow::name() const {
115 // FIXME: Implement.
116 return emptyAtom;
117 }
118
119 void RemoteDOMWindow::setName(const AtomicString&) {}
120
121 String RemoteDOMWindow::status() const {
122 ASSERT_NOT_REACHED();
123 return String();
124 }
125
126 void RemoteDOMWindow::setStatus(const String&) {
127 ASSERT_NOT_REACHED();
128 }
129
130 String RemoteDOMWindow::defaultStatus() const {
131 ASSERT_NOT_REACHED();
132 return String();
133 }
134
135 void RemoteDOMWindow::setDefaultStatus(const String&) {
136 ASSERT_NOT_REACHED();
137 }
138
139 Document* RemoteDOMWindow::document() const {
140 ASSERT_NOT_REACHED();
141 return nullptr;
142 }
143
144 StyleMedia* RemoteDOMWindow::styleMedia() const {
145 ASSERT_NOT_REACHED();
146 return nullptr;
147 }
148
149 double RemoteDOMWindow::devicePixelRatio() const {
150 ASSERT_NOT_REACHED();
151 return 0.0;
152 }
153
154 ApplicationCache* RemoteDOMWindow::applicationCache() const {
155 ASSERT_NOT_REACHED();
156 return nullptr;
157 }
158
159 int RemoteDOMWindow::orientation() const {
160 ASSERT_NOT_REACHED();
161 return 0;
162 }
163
164 DOMSelection* RemoteDOMWindow::getSelection() {
165 ASSERT_NOT_REACHED();
166 return 0;
167 }
168
169 void RemoteDOMWindow::blur() { 20 void RemoteDOMWindow::blur() {
170 // FIXME: Implement. 21 // FIXME: Implement.
171 } 22 }
172 23
173 void RemoteDOMWindow::print(ScriptState*) {
174 ASSERT_NOT_REACHED();
175 }
176
177 void RemoteDOMWindow::stop() {
178 // FIXME: Implement.
179 }
180
181 void RemoteDOMWindow::alert(ScriptState*, const String& message) {
182 ASSERT_NOT_REACHED();
183 }
184
185 bool RemoteDOMWindow::confirm(ScriptState*, const String& message) {
186 ASSERT_NOT_REACHED();
187 return false;
188 }
189
190 String RemoteDOMWindow::prompt(ScriptState*,
191 const String& message,
192 const String& defaultValue) {
193 ASSERT_NOT_REACHED();
194 return String();
195 }
196
197 bool RemoteDOMWindow::find(const String&,
198 bool caseSensitive,
199 bool backwards,
200 bool wrap,
201 bool wholeWord,
202 bool searchInFrames,
203 bool showDialog) const {
204 ASSERT_NOT_REACHED();
205 return false;
206 }
207
208 void RemoteDOMWindow::scrollBy(double x, double y, ScrollBehavior) const {
209 ASSERT_NOT_REACHED();
210 }
211
212 void RemoteDOMWindow::scrollBy(const ScrollToOptions&) const {
213 ASSERT_NOT_REACHED();
214 }
215
216 void RemoteDOMWindow::scrollTo(double x, double y) const {
217 ASSERT_NOT_REACHED();
218 }
219
220 void RemoteDOMWindow::scrollTo(const ScrollToOptions&) const {
221 ASSERT_NOT_REACHED();
222 }
223
224 void RemoteDOMWindow::moveBy(int x, int y) const {
225 ASSERT_NOT_REACHED();
226 }
227
228 void RemoteDOMWindow::moveTo(int x, int y) const {
229 ASSERT_NOT_REACHED();
230 }
231
232 void RemoteDOMWindow::resizeBy(int x, int y) const {
233 ASSERT_NOT_REACHED();
234 }
235
236 void RemoteDOMWindow::resizeTo(int width, int height) const {
237 ASSERT_NOT_REACHED();
238 }
239
240 MediaQueryList* RemoteDOMWindow::matchMedia(const String&) {
241 ASSERT_NOT_REACHED();
242 return nullptr;
243 }
244
245 CSSStyleDeclaration* RemoteDOMWindow::getComputedStyle(
246 Element*,
247 const String& pseudoElt) const {
248 ASSERT_NOT_REACHED();
249 return nullptr;
250 }
251
252 CSSRuleList* RemoteDOMWindow::getMatchedCSSRules(
253 Element*,
254 const String& pseudoElt) const {
255 ASSERT_NOT_REACHED();
256 return nullptr;
257 }
258
259 int RemoteDOMWindow::requestAnimationFrame(FrameRequestCallback*) {
260 ASSERT_NOT_REACHED();
261 return 0;
262 }
263
264 int RemoteDOMWindow::webkitRequestAnimationFrame(FrameRequestCallback*) {
265 ASSERT_NOT_REACHED();
266 return 0;
267 }
268
269 void RemoteDOMWindow::cancelAnimationFrame(int id) {
270 ASSERT_NOT_REACHED();
271 }
272
273 int RemoteDOMWindow::requestIdleCallback(IdleRequestCallback*,
274 const IdleRequestOptions&) {
275 ASSERT_NOT_REACHED();
276 return 0;
277 }
278
279 void RemoteDOMWindow::cancelIdleCallback(int id) {
280 ASSERT_NOT_REACHED();
281 }
282
283 CustomElementRegistry* RemoteDOMWindow::customElements(ScriptState*) const {
284 ASSERT_NOT_REACHED();
285 return nullptr;
286 }
287
288 RemoteDOMWindow::RemoteDOMWindow(RemoteFrame& frame) : DOMWindow(frame) {} 24 RemoteDOMWindow::RemoteDOMWindow(RemoteFrame& frame) : DOMWindow(frame) {}
289 25
290 void RemoteDOMWindow::frameDetached() { 26 void RemoteDOMWindow::frameDetached() {
291 disconnectFromFrame(); 27 disconnectFromFrame();
292 } 28 }
293 29
294 void RemoteDOMWindow::schedulePostMessage(MessageEvent* event, 30 void RemoteDOMWindow::schedulePostMessage(MessageEvent* event,
295 PassRefPtr<SecurityOrigin> target, 31 PassRefPtr<SecurityOrigin> target,
296 Document* source) { 32 Document* source) {
297 frame()->client()->forwardPostMessage(event, std::move(target), 33 frame()->client()->forwardPostMessage(event, std::move(target),
298 source->frame()); 34 source->frame());
299 } 35 }
300 36
301 } // namespace blink 37 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/RemoteDOMWindow.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698