OLD | NEW |
---|---|
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 Loading... | |
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 DCHECK(proxy); | |
nasko
2015/01/20 23:51:23
nit: no need for this DCHECK, it will crash on the
lazyboy
2015/01/21 18:52:14
Done.
| |
524 // We have also created a RenderFrameProxy in FrameMsg_NewFrame above, so | |
525 // remember that. | |
526 proxy->set_render_frame_proxy_created(true); | |
527 } | |
528 | |
520 // The renderer now has a RenderFrame for this RenderFrameHost. Note that | 529 // 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 | 530 // 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 | 531 // are created with their RenderView, and same-site iframes are created at the |
523 // time of OnCreateChildFrame. | 532 // time of OnCreateChildFrame. |
524 set_render_frame_created(true); | 533 set_render_frame_created(true); |
525 | 534 |
526 return true; | 535 return true; |
527 } | 536 } |
528 | 537 |
529 bool RenderFrameHostImpl::IsRenderFrameLive() { | 538 bool RenderFrameHostImpl::IsRenderFrameLive() { |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1642 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1651 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1643 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1652 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1644 GetContentClient()->browser()->RegisterPermissionUsage( | 1653 GetContentClient()->browser()->RegisterPermissionUsage( |
1645 PERMISSION_GEOLOCATION, | 1654 PERMISSION_GEOLOCATION, |
1646 delegate_->GetAsWebContents(), | 1655 delegate_->GetAsWebContents(), |
1647 GetLastCommittedURL().GetOrigin(), | 1656 GetLastCommittedURL().GetOrigin(), |
1648 top_frame->GetLastCommittedURL().GetOrigin()); | 1657 top_frame->GetLastCommittedURL().GetOrigin()); |
1649 } | 1658 } |
1650 | 1659 |
1651 } // namespace content | 1660 } // namespace content |
OLD | NEW |