| 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1780 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
| 1773 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1781 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
| 1774 GetContentClient()->browser()->RegisterPermissionUsage( | 1782 GetContentClient()->browser()->RegisterPermissionUsage( |
| 1775 PERMISSION_GEOLOCATION, | 1783 PERMISSION_GEOLOCATION, |
| 1776 delegate_->GetAsWebContents(), | 1784 delegate_->GetAsWebContents(), |
| 1777 GetLastCommittedURL().GetOrigin(), | 1785 GetLastCommittedURL().GetOrigin(), |
| 1778 top_frame->GetLastCommittedURL().GetOrigin()); | 1786 top_frame->GetLastCommittedURL().GetOrigin()); |
| 1779 } | 1787 } |
| 1780 | 1788 |
| 1781 } // namespace content | 1789 } // namespace content |
| OLD | NEW |