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

Side by Side Diff: Source/core/frame/RemoteFrame.cpp

Issue 914523002: Initialize WindowProxy for RemoteFrames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/frame/RemoteFrame.h" 6 #include "core/frame/RemoteFrame.h"
7 7
8 #include "bindings/core/v8/WindowProxy.h"
8 #include "bindings/core/v8/WindowProxyManager.h" 9 #include "bindings/core/v8/WindowProxyManager.h"
9 #include "core/dom/RemoteSecurityContext.h" 10 #include "core/dom/RemoteSecurityContext.h"
10 #include "core/frame/RemoteDOMWindow.h" 11 #include "core/frame/RemoteDOMWindow.h"
11 #include "core/frame/RemoteFrameClient.h" 12 #include "core/frame/RemoteFrameClient.h"
12 #include "core/frame/RemoteFrameView.h" 13 #include "core/frame/RemoteFrameView.h"
13 #include "core/html/HTMLFrameOwnerElement.h" 14 #include "core/html/HTMLFrameOwnerElement.h"
14 #include "platform/weborigin/SecurityPolicy.h" 15 #include "platform/weborigin/SecurityPolicy.h"
15 16
16 namespace blink { 17 namespace blink {
17 18
(...skipping 23 matching lines...) Expand all
41 Frame::trace(visitor); 42 Frame::trace(visitor);
42 } 43 }
43 44
44 DOMWindow* RemoteFrame::domWindow() const 45 DOMWindow* RemoteFrame::domWindow() const
45 { 46 {
46 return m_domWindow.get(); 47 return m_domWindow.get();
47 } 48 }
48 49
49 WindowProxy* RemoteFrame::windowProxy(DOMWrapperWorld& world) 50 WindowProxy* RemoteFrame::windowProxy(DOMWrapperWorld& world)
50 { 51 {
51 return m_windowProxyManager->windowProxy(world); 52 WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world);
haraken 2015/02/10 01:10:51 Shall we add ASSERT(windowProxy) until we allow a
dcheng 2015/02/10 18:57:48 Done.
53 windowProxy->initializeIfNeeded();
54 return windowProxy;
52 } 55 }
53 56
54 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB ackForwardList) 57 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB ackForwardList)
55 { 58 {
56 // The process where this frame actually lives won't have sufficient informa tion to determine 59 // The process where this frame actually lives won't have sufficient informa tion to determine
57 // correct referrer, since it won't have access to the originDocument. Set i t now. 60 // correct referrer, since it won't have access to the originDocument. Set i t now.
58 ResourceRequest request(url); 61 ResourceRequest request(url);
59 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe rrerPolicy(), url, originDocument.outgoingReferrer())); 62 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe rrerPolicy(), url, originDocument.outgoingReferrer()));
60 remoteFrameClient()->navigate(request, lockBackForwardList); 63 remoteFrameClient()->navigate(request, lockBackForwardList);
61 } 64 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 owner->setWidget(view); 105 owner->setWidget(view);
103 } 106 }
104 } 107 }
105 108
106 RemoteFrameClient* RemoteFrame::remoteFrameClient() const 109 RemoteFrameClient* RemoteFrame::remoteFrameClient() const
107 { 110 {
108 return static_cast<RemoteFrameClient*>(client()); 111 return static_cast<RemoteFrameClient*>(client());
109 } 112 }
110 113
111 } // namespace blink 114 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698