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

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 881413005: Fix flakyness in NavigateRemoteFrame browsertest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | 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 "content/renderer/render_frame_proxy.h" 5 #include "content/renderer/render_frame_proxy.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "content/child/webmessageportchannel_impl.h" 10 #include "content/child/webmessageportchannel_impl.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 DCHECK(web_frame_->isWebRemoteFrame()); 188 DCHECK(web_frame_->isWebRemoteFrame());
189 web_frame_->detach(); 189 web_frame_->detach();
190 } 190 }
191 191
192 void RenderFrameProxy::OnChildFrameProcessGone() { 192 void RenderFrameProxy::OnChildFrameProcessGone() {
193 if (compositing_helper_.get()) 193 if (compositing_helper_.get())
194 compositing_helper_->ChildFrameGone(); 194 compositing_helper_->ChildFrameGone();
195 } 195 }
196 196
197 void RenderFrameProxy::OnCompositorFrameSwapped(const IPC::Message& message) { 197 void RenderFrameProxy::OnCompositorFrameSwapped(const IPC::Message& message) {
198 // If this WebFrame has already been detached, its parent will be null. This
199 // can happen when swapping a WebRemoteFrame with a WebLocalFrame, where this
200 // message may arrive after the frame was removed from the frame tree, but
201 // before the frame has been destroyed. http://crbug.com/446575.
202 if (!web_frame()->parent())
203 return;
204
198 FrameMsg_CompositorFrameSwapped::Param param; 205 FrameMsg_CompositorFrameSwapped::Param param;
199 if (!FrameMsg_CompositorFrameSwapped::Read(&message, &param)) 206 if (!FrameMsg_CompositorFrameSwapped::Read(&message, &param))
200 return; 207 return;
201 208
202 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); 209 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
203 get<0>(param).frame.AssignTo(frame.get()); 210 get<0>(param).frame.AssignTo(frame.get());
204 211
205 if (!compositing_helper_.get()) { 212 if (!compositing_helper_.get()) {
206 compositing_helper_ = 213 compositing_helper_ =
207 ChildFrameCompositingHelper::CreateForRenderFrameProxy(this); 214 ChildFrameCompositingHelper::CreateForRenderFrameProxy(this);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 blink::WebUserGestureIndicator::isProcessingUserGesture(); 327 blink::WebUserGestureIndicator::isProcessingUserGesture();
321 blink::WebUserGestureIndicator::consumeUserGesture(); 328 blink::WebUserGestureIndicator::consumeUserGesture();
322 Send(new FrameHostMsg_OpenURL(routing_id_, params)); 329 Send(new FrameHostMsg_OpenURL(routing_id_, params));
323 } 330 }
324 331
325 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { 332 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) {
326 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 333 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
327 } 334 }
328 335
329 } // namespace 336 } // namespace
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698