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

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

Issue 2626403002: Move Frame pointer to be held by DOMWindow base class. (Closed)
Patch Set: . Created 3 years, 11 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" 7 #include "bindings/core/v8/SerializedScriptValue.h"
8 #include "core/css/CSSRuleList.h" 8 #include "core/css/CSSRuleList.h"
9 #include "core/css/CSSStyleDeclaration.h" 9 #include "core/css/CSSStyleDeclaration.h"
10 #include "core/css/MediaQueryList.h" 10 #include "core/css/MediaQueryList.h"
11 #include "core/dom/Document.h" 11 #include "core/dom/Document.h"
12 #include "core/frame/RemoteFrameClient.h" 12 #include "core/frame/RemoteFrameClient.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 ExecutionContext* RemoteDOMWindow::getExecutionContext() const { 16 ExecutionContext* RemoteDOMWindow::getExecutionContext() const {
17 return nullptr; 17 return nullptr;
18 } 18 }
19 19
20 DEFINE_TRACE(RemoteDOMWindow) { 20 DEFINE_TRACE(RemoteDOMWindow) {
21 visitor->trace(m_frame);
22 DOMWindow::trace(visitor); 21 DOMWindow::trace(visitor);
23 } 22 }
24 23
25 RemoteFrame* RemoteDOMWindow::frame() const {
26 return m_frame.get();
27 }
28
29 Screen* RemoteDOMWindow::screen() const { 24 Screen* RemoteDOMWindow::screen() const {
30 ASSERT_NOT_REACHED(); 25 ASSERT_NOT_REACHED();
31 return nullptr; 26 return nullptr;
32 } 27 }
33 28
34 History* RemoteDOMWindow::history() const { 29 History* RemoteDOMWindow::history() const {
35 ASSERT_NOT_REACHED(); 30 ASSERT_NOT_REACHED();
36 return nullptr; 31 return nullptr;
37 } 32 }
38 33
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 278
284 void RemoteDOMWindow::cancelIdleCallback(int id) { 279 void RemoteDOMWindow::cancelIdleCallback(int id) {
285 ASSERT_NOT_REACHED(); 280 ASSERT_NOT_REACHED();
286 } 281 }
287 282
288 CustomElementRegistry* RemoteDOMWindow::customElements(ScriptState*) const { 283 CustomElementRegistry* RemoteDOMWindow::customElements(ScriptState*) const {
289 ASSERT_NOT_REACHED(); 284 ASSERT_NOT_REACHED();
290 return nullptr; 285 return nullptr;
291 } 286 }
292 287
293 RemoteDOMWindow::RemoteDOMWindow(RemoteFrame& frame) : m_frame(&frame) {} 288 RemoteDOMWindow::RemoteDOMWindow(RemoteFrame& frame) : DOMWindow(frame) {}
294 289
295 void RemoteDOMWindow::frameDetached() { 290 void RemoteDOMWindow::frameDetached() {
296 m_frame = nullptr; 291 disconnectFromFrame();
297 } 292 }
298 293
299 void RemoteDOMWindow::schedulePostMessage(MessageEvent* event, 294 void RemoteDOMWindow::schedulePostMessage(MessageEvent* event,
300 PassRefPtr<SecurityOrigin> target, 295 PassRefPtr<SecurityOrigin> target,
301 Document* source) { 296 Document* source) {
302 m_frame->client()->forwardPostMessage(event, std::move(target), 297 frame()->client()->forwardPostMessage(event, std::move(target),
303 source->frame()); 298 source->frame());
304 } 299 }
305 300
306 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698