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

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: Cleaned up test files to load the tree structure directly from html Created 5 years, 11 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 // crashed) have been initialized. Calling Init multiple times will be 510 // crashed) have been initialized. Calling Init multiple times will be
511 // ignored, so this is safe. 511 // ignored, so this is safe.
512 if (!GetProcess()->Init()) 512 if (!GetProcess()->Init())
513 return false; 513 return false;
514 514
515 DCHECK(GetProcess()->HasConnection()); 515 DCHECK(GetProcess()->HasConnection());
516 516
517 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id, proxy_routing_id, 517 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id, proxy_routing_id,
518 frame_tree_node()->current_replication_state())); 518 frame_tree_node()->current_replication_state()));
519 519
520 if (proxy_routing_id != MSG_ROUTING_NONE) {
521 RenderFrameProxyHost* proxy = RenderFrameProxyHost::FromID(
522 GetProcess()->GetID(), proxy_routing_id);
523 // We have also created a RenderFrameProxy in FrameMsg_NewFrame above, so
524 // remember that.
525 proxy->set_render_frame_proxy_created(true);
526 }
527
520 // The renderer now has a RenderFrame for this RenderFrameHost. Note that 528 // The renderer now has a RenderFrame for this RenderFrameHost. Note that
521 // this path is only used for out-of-process iframes. Main frame RenderFrames 529 // this path is only used for out-of-process iframes. Main frame RenderFrames
522 // are created with their RenderView, and same-site iframes are created at the 530 // are created with their RenderView, and same-site iframes are created at the
523 // time of OnCreateChildFrame. 531 // time of OnCreateChildFrame.
524 set_render_frame_created(true); 532 set_render_frame_created(true);
525 533
526 return true; 534 return true;
527 } 535 }
528 536
529 bool RenderFrameHostImpl::IsRenderFrameLive() { 537 bool RenderFrameHostImpl::IsRenderFrameLive() {
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 void RenderFrameHostImpl::DidUseGeolocationPermission() { 1650 void RenderFrameHostImpl::DidUseGeolocationPermission() {
1643 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); 1651 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame();
1644 GetContentClient()->browser()->RegisterPermissionUsage( 1652 GetContentClient()->browser()->RegisterPermissionUsage(
1645 PERMISSION_GEOLOCATION, 1653 PERMISSION_GEOLOCATION,
1646 delegate_->GetAsWebContents(), 1654 delegate_->GetAsWebContents(),
1647 GetLastCommittedURL().GetOrigin(), 1655 GetLastCommittedURL().GetOrigin(),
1648 top_frame->GetLastCommittedURL().GetOrigin()); 1656 top_frame->GetLastCommittedURL().GetOrigin());
1649 } 1657 }
1650 1658
1651 } // namespace content 1659 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698