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

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

Issue 1802953003: RemoteBridgeFrameOwner: keep better track of the attached frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't call virtuals indirectly from a ctor. Created 4 years, 9 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/RemoteFrame.h" 5 #include "core/frame/RemoteFrame.h"
6 6
7 #include "bindings/core/v8/WindowProxy.h" 7 #include "bindings/core/v8/WindowProxy.h"
8 #include "bindings/core/v8/WindowProxyManager.h" 8 #include "bindings/core/v8/WindowProxyManager.h"
9 #include "core/dom/RemoteSecurityContext.h" 9 #include "core/dom/RemoteSecurityContext.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (!client()) 97 if (!client())
98 return; 98 return;
99 99
100 // Clean up the frame's view if needed. A remote frame only has a view if 100 // Clean up the frame's view if needed. A remote frame only has a view if
101 // the parent is a local frame. 101 // the parent is a local frame.
102 if (m_view) 102 if (m_view)
103 m_view->dispose(); 103 m_view->dispose();
104 client()->willBeDetached(); 104 client()->willBeDetached();
105 m_windowProxyManager->clearForClose(); 105 m_windowProxyManager->clearForClose();
106 setView(nullptr); 106 setView(nullptr);
107 if (m_remotePlatformLayer)
108 setRemotePlatformLayer(nullptr);
107 Frame::detach(type); 109 Frame::detach(type);
108 } 110 }
109 111
110 bool RemoteFrame::prepareForCommit() 112 bool RemoteFrame::prepareForCommit()
111 { 113 {
112 detachChildren(); 114 detachChildren();
113 return !!host(); 115 return !!host();
114 } 116 }
115 117
116 RemoteSecurityContext* RemoteFrame::securityContext() const 118 RemoteSecurityContext* RemoteFrame::securityContext() const
117 { 119 {
118 return m_securityContext.get(); 120 return m_securityContext.get();
119 } 121 }
120 122
121 void RemoteFrame::disconnectOwnerElement()
122 {
123 // The RemotePlatformLayer needs to be cleared in disconnectOwnerElement()
124 // because it must happen on WebFrame::swap() and Frame::detach().
125 if (m_remotePlatformLayer)
dcheng 2016/03/16 09:26:18 This lets Frame::disconnectOwnerElement be devirtu
126 setRemotePlatformLayer(nullptr);
127
128 Frame::disconnectOwnerElement();
129 }
130
131 bool RemoteFrame::shouldClose() 123 bool RemoteFrame::shouldClose()
132 { 124 {
133 // TODO(nasko): Implement running the beforeunload handler in the actual 125 // TODO(nasko): Implement running the beforeunload handler in the actual
134 // LocalFrame running in a different process and getting back a real result. 126 // LocalFrame running in a different process and getting back a real result.
135 return true; 127 return true;
136 } 128 }
137 129
138 void RemoteFrame::forwardInputEvent(Event* event) 130 void RemoteFrame::forwardInputEvent(Event* event)
139 { 131 {
140 remoteFrameClient()->forwardInputEvent(event); 132 remoteFrameClient()->forwardInputEvent(event);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ASSERT(owner()); 189 ASSERT(owner());
198 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); 190 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate();
199 } 191 }
200 192
201 void RemoteFrame::advanceFocus(WebFocusType type, LocalFrame* source) 193 void RemoteFrame::advanceFocus(WebFocusType type, LocalFrame* source)
202 { 194 {
203 remoteFrameClient()->advanceFocus(type, source); 195 remoteFrameClient()->advanceFocus(type, source);
204 } 196 }
205 197
206 } // namespace blink 198 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698