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_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 22 matching lines...) Expand all Loading... | |
33 #include "content/browser/renderer_host/render_process_host_impl.h" | 33 #include "content/browser/renderer_host/render_process_host_impl.h" |
34 #include "content/browser/renderer_host/render_view_host_factory.h" | 34 #include "content/browser/renderer_host/render_view_host_factory.h" |
35 #include "content/browser/renderer_host/render_view_host_impl.h" | 35 #include "content/browser/renderer_host/render_view_host_impl.h" |
36 #include "content/browser/site_instance_impl.h" | 36 #include "content/browser/site_instance_impl.h" |
37 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 37 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
38 #include "content/common/frame_messages.h" | 38 #include "content/common/frame_messages.h" |
39 #include "content/common/frame_owner_properties.h" | 39 #include "content/common/frame_owner_properties.h" |
40 #include "content/common/site_isolation_policy.h" | 40 #include "content/common/site_isolation_policy.h" |
41 #include "content/common/view_messages.h" | 41 #include "content/common/view_messages.h" |
42 #include "content/public/browser/content_browser_client.h" | 42 #include "content/public/browser/content_browser_client.h" |
43 #include "content/public/browser/guest_mode.h" | |
43 #include "content/public/browser/render_process_host_observer.h" | 44 #include "content/public/browser/render_process_host_observer.h" |
44 #include "content/public/browser/render_widget_host_iterator.h" | 45 #include "content/public/browser/render_widget_host_iterator.h" |
45 #include "content/public/browser/render_widget_host_view.h" | 46 #include "content/public/browser/render_widget_host_view.h" |
46 #include "content/public/browser/user_metrics.h" | 47 #include "content/public/browser/user_metrics.h" |
47 #include "content/public/common/browser_plugin_guest_mode.h" | |
48 #include "content/public/common/browser_side_navigation_policy.h" | 48 #include "content/public/common/browser_side_navigation_policy.h" |
49 #include "content/public/common/content_switches.h" | 49 #include "content/public/common/content_switches.h" |
50 #include "content/public/common/referrer.h" | 50 #include "content/public/common/referrer.h" |
51 #include "content/public/common/url_constants.h" | 51 #include "content/public/common/url_constants.h" |
52 | 52 |
53 namespace content { | 53 namespace content { |
54 | 54 |
55 RenderFrameHostManager::RenderFrameHostManager( | 55 RenderFrameHostManager::RenderFrameHostManager( |
56 FrameTreeNode* frame_tree_node, | 56 FrameTreeNode* frame_tree_node, |
57 RenderFrameHostDelegate* render_frame_delegate, | 57 RenderFrameHostDelegate* render_frame_delegate, |
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1818 RenderFrameProxyHost* proxy = GetRenderFrameProxyHost(instance); | 1818 RenderFrameProxyHost* proxy = GetRenderFrameProxyHost(instance); |
1819 if (!proxy) | 1819 if (!proxy) |
1820 return; | 1820 return; |
1821 | 1821 |
1822 InitRenderView(render_view_host, proxy); | 1822 InitRenderView(render_view_host, proxy); |
1823 } | 1823 } |
1824 | 1824 |
1825 void RenderFrameHostManager::CreateOuterDelegateProxy( | 1825 void RenderFrameHostManager::CreateOuterDelegateProxy( |
1826 SiteInstance* outer_contents_site_instance, | 1826 SiteInstance* outer_contents_site_instance, |
1827 RenderFrameHostImpl* render_frame_host) { | 1827 RenderFrameHostImpl* render_frame_host) { |
1828 CHECK(BrowserPluginGuestMode::UseCrossProcessFramesForGuests()); | 1828 CHECK(GuestMode::ForInnerWebContentsUsingCrossProcessFrames(current_host())); |
Charlie Reis
2016/09/21 22:18:21
This is just a sanity check, so I don't think we n
EhsanK
2016/09/22 22:55:44
Acknowledged.
| |
1829 RenderFrameProxyHost* proxy = | 1829 RenderFrameProxyHost* proxy = |
1830 CreateRenderFrameProxyHost(outer_contents_site_instance, nullptr); | 1830 CreateRenderFrameProxyHost(outer_contents_site_instance, nullptr); |
1831 | 1831 |
1832 // Swap the outer WebContents's frame with the proxy to inner WebContents. | 1832 // Swap the outer WebContents's frame with the proxy to inner WebContents. |
1833 // | 1833 // |
1834 // We are in the outer WebContents, and its FrameTree would never see | 1834 // We are in the outer WebContents, and its FrameTree would never see |
1835 // a load start for any of its inner WebContents. Eventually, that also makes | 1835 // a load start for any of its inner WebContents. Eventually, that also makes |
1836 // the FrameTree never see the matching load stop. Therefore, we always pass | 1836 // the FrameTree never see the matching load stop. Therefore, we always pass |
1837 // false to |is_loading| below. | 1837 // false to |is_loading| below. |
1838 // TODO(lazyboy): This |is_loading| behavior might not be what we want, | 1838 // TODO(lazyboy): This |is_loading| behavior might not be what we want, |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2675 resolved_url)) { | 2675 resolved_url)) { |
2676 DCHECK(!dest_instance || | 2676 DCHECK(!dest_instance || |
2677 dest_instance == render_frame_host_->GetSiteInstance()); | 2677 dest_instance == render_frame_host_->GetSiteInstance()); |
2678 return false; | 2678 return false; |
2679 } | 2679 } |
2680 | 2680 |
2681 return true; | 2681 return true; |
2682 } | 2682 } |
2683 | 2683 |
2684 } // namespace content | 2684 } // namespace content |
OLD | NEW |