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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 782093002: Ensure that before creating proxy of site A, RVH of site A is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix RenderFrameHostManagerTest.CleanUpSwappedOutRVHOnProcessCrash 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 widget_params)); 561 widget_params));
562 562
563 // The RenderWidgetHost takes ownership of its view. It is tied to the 563 // The RenderWidgetHost takes ownership of its view. It is tied to the
564 // lifetime of the current RenderProcessHost for this RenderFrameHost. 564 // lifetime of the current RenderProcessHost for this RenderFrameHost.
565 if (render_widget_host_) { 565 if (render_widget_host_) {
566 RenderWidgetHostView* rwhv = 566 RenderWidgetHostView* rwhv =
567 new RenderWidgetHostViewChildFrame(render_widget_host_.get()); 567 new RenderWidgetHostViewChildFrame(render_widget_host_.get());
568 rwhv->Hide(); 568 rwhv->Hide();
569 } 569 }
570 570
571 if (proxy_routing_id != MSG_ROUTING_NONE) {
572 RenderFrameProxyHost* proxy = RenderFrameProxyHost::FromID(
573 GetProcess()->GetID(), proxy_routing_id);
574 // We have also created a RenderFrameProxy in FrameMsg_NewFrame above, so
575 // remember that.
576 proxy->set_render_frame_proxy_created(true);
577 }
578
571 // The renderer now has a RenderFrame for this RenderFrameHost. Note that 579 // The renderer now has a RenderFrame for this RenderFrameHost. Note that
572 // this path is only used for out-of-process iframes. Main frame RenderFrames 580 // this path is only used for out-of-process iframes. Main frame RenderFrames
573 // are created with their RenderView, and same-site iframes are created at the 581 // are created with their RenderView, and same-site iframes are created at the
574 // time of OnCreateChildFrame. 582 // time of OnCreateChildFrame.
575 SetRenderFrameCreated(true); 583 SetRenderFrameCreated(true);
576 584
577 return true; 585 return true;
578 } 586 }
579 587
580 bool RenderFrameHostImpl::IsRenderFrameLive() { 588 bool RenderFrameHostImpl::IsRenderFrameLive() {
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 void RenderFrameHostImpl::DidUseGeolocationPermission() { 1779 void RenderFrameHostImpl::DidUseGeolocationPermission() {
1772 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); 1780 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame();
1773 GetContentClient()->browser()->RegisterPermissionUsage( 1781 GetContentClient()->browser()->RegisterPermissionUsage(
1774 PERMISSION_GEOLOCATION, 1782 PERMISSION_GEOLOCATION,
1775 delegate_->GetAsWebContents(), 1783 delegate_->GetAsWebContents(),
1776 GetLastCommittedURL().GetOrigin(), 1784 GetLastCommittedURL().GetOrigin(),
1777 top_frame->GetLastCommittedURL().GetOrigin()); 1785 top_frame->GetLastCommittedURL().GetOrigin());
1778 } 1786 }
1779 1787
1780 } // namespace content 1788 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698