OLD | NEW |
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 <stdint.h> | 7 #include <stdint.h> |
8 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 DCHECK(web_frame_); | 317 DCHECK(web_frame_); |
318 web_frame_->detach(); | 318 web_frame_->detach(); |
319 } | 319 } |
320 | 320 |
321 void RenderFrameProxy::OnChildFrameProcessGone() { | 321 void RenderFrameProxy::OnChildFrameProcessGone() { |
322 if (compositing_helper_.get()) | 322 if (compositing_helper_.get()) |
323 compositing_helper_->ChildFrameGone(); | 323 compositing_helper_->ChildFrameGone(); |
324 } | 324 } |
325 | 325 |
326 void RenderFrameProxy::OnSetChildFrameSurface( | 326 void RenderFrameProxy::OnSetChildFrameSurface( |
327 const cc::SurfaceId& surface_id, | 327 const cc::SurfaceInfo& surface_info, |
328 const gfx::Size& frame_size, | |
329 float scale_factor, | |
330 const cc::SurfaceSequence& sequence) { | 328 const cc::SurfaceSequence& sequence) { |
331 // If this WebFrame has already been detached, its parent will be null. This | 329 // If this WebFrame has already been detached, its parent will be null. This |
332 // can happen when swapping a WebRemoteFrame with a WebLocalFrame, where this | 330 // can happen when swapping a WebRemoteFrame with a WebLocalFrame, where this |
333 // message may arrive after the frame was removed from the frame tree, but | 331 // message may arrive after the frame was removed from the frame tree, but |
334 // before the frame has been destroyed. http://crbug.com/446575. | 332 // before the frame has been destroyed. http://crbug.com/446575. |
335 if (!web_frame()->parent()) | 333 if (!web_frame()->parent()) |
336 return; | 334 return; |
337 | 335 |
338 if (!compositing_helper_.get()) { | 336 if (!compositing_helper_.get()) { |
339 compositing_helper_ = | 337 compositing_helper_ = |
340 ChildFrameCompositingHelper::CreateForRenderFrameProxy(this); | 338 ChildFrameCompositingHelper::CreateForRenderFrameProxy(this); |
341 } | 339 } |
342 compositing_helper_->OnSetSurface( | 340 compositing_helper_->OnSetSurface(surface_info, sequence); |
343 cc::SurfaceInfo(surface_id, scale_factor, frame_size), sequence); | |
344 } | 341 } |
345 | 342 |
346 void RenderFrameProxy::OnUpdateOpener(int opener_routing_id) { | 343 void RenderFrameProxy::OnUpdateOpener(int opener_routing_id) { |
347 blink::WebFrame* opener = RenderFrameImpl::ResolveOpener(opener_routing_id); | 344 blink::WebFrame* opener = RenderFrameImpl::ResolveOpener(opener_routing_id); |
348 web_frame_->setOpener(opener); | 345 web_frame_->setOpener(opener); |
349 } | 346 } |
350 | 347 |
351 void RenderFrameProxy::OnDidStartLoading() { | 348 void RenderFrameProxy::OnDidStartLoading() { |
352 web_frame_->didStartLoading(); | 349 web_frame_->didStartLoading(); |
353 } | 350 } |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 blink::WebLocalFrame* source) { | 524 blink::WebLocalFrame* source) { |
528 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 525 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
529 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 526 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
530 } | 527 } |
531 | 528 |
532 void RenderFrameProxy::frameFocused() { | 529 void RenderFrameProxy::frameFocused() { |
533 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 530 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
534 } | 531 } |
535 | 532 |
536 } // namespace | 533 } // namespace |
OLD | NEW |