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 28 matching lines...) Expand all Loading... |
39 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 39 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
40 #include "content/browser/renderer_host/render_view_host_impl.h" | 40 #include "content/browser/renderer_host/render_view_host_impl.h" |
41 #include "content/browser/renderer_host/render_widget_host_impl.h" | 41 #include "content/browser/renderer_host/render_widget_host_impl.h" |
42 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 42 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
43 #include "content/common/accessibility_messages.h" | 43 #include "content/common/accessibility_messages.h" |
44 #include "content/common/frame_messages.h" | 44 #include "content/common/frame_messages.h" |
45 #include "content/common/input_messages.h" | 45 #include "content/common/input_messages.h" |
46 #include "content/common/inter_process_time_ticks_converter.h" | 46 #include "content/common/inter_process_time_ticks_converter.h" |
47 #include "content/common/navigation_params.h" | 47 #include "content/common/navigation_params.h" |
48 #include "content/common/render_frame_setup.mojom.h" | 48 #include "content/common/render_frame_setup.mojom.h" |
| 49 #include "content/common/site_isolation_policy.h" |
49 #include "content/common/swapped_out_messages.h" | 50 #include "content/common/swapped_out_messages.h" |
50 #include "content/public/browser/ax_event_notification_details.h" | 51 #include "content/public/browser/ax_event_notification_details.h" |
51 #include "content/public/browser/browser_accessibility_state.h" | 52 #include "content/public/browser/browser_accessibility_state.h" |
52 #include "content/public/browser/browser_context.h" | 53 #include "content/public/browser/browser_context.h" |
53 #include "content/public/browser/browser_plugin_guest_manager.h" | 54 #include "content/public/browser/browser_plugin_guest_manager.h" |
54 #include "content/public/browser/browser_thread.h" | 55 #include "content/public/browser/browser_thread.h" |
55 #include "content/public/browser/content_browser_client.h" | 56 #include "content/public/browser/content_browser_client.h" |
56 #include "content/public/browser/permission_manager.h" | 57 #include "content/public/browser/permission_manager.h" |
57 #include "content/public/browser/permission_type.h" | 58 #include "content/public/browser/permission_type.h" |
58 #include "content/public/browser/render_process_host.h" | 59 #include "content/public/browser/render_process_host.h" |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1310 const CommonNavigationParams& common_params, | 1311 const CommonNavigationParams& common_params, |
1311 const BeginNavigationParams& begin_params, | 1312 const BeginNavigationParams& begin_params, |
1312 scoped_refptr<ResourceRequestBody> body) { | 1313 scoped_refptr<ResourceRequestBody> body) { |
1313 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | 1314 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
1314 switches::kEnableBrowserSideNavigation)); | 1315 switches::kEnableBrowserSideNavigation)); |
1315 frame_tree_node()->navigator()->OnBeginNavigation( | 1316 frame_tree_node()->navigator()->OnBeginNavigation( |
1316 frame_tree_node(), common_params, begin_params, body); | 1317 frame_tree_node(), common_params, begin_params, body); |
1317 } | 1318 } |
1318 | 1319 |
1319 void RenderFrameHostImpl::OnDispatchLoad() { | 1320 void RenderFrameHostImpl::OnDispatchLoad() { |
1320 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | 1321 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); |
1321 switches::kSitePerProcess)); | |
1322 // Only frames with an out-of-process parent frame should be sending this | 1322 // Only frames with an out-of-process parent frame should be sending this |
1323 // message. | 1323 // message. |
1324 RenderFrameProxyHost* proxy = | 1324 RenderFrameProxyHost* proxy = |
1325 frame_tree_node()->render_manager()->GetProxyToParent(); | 1325 frame_tree_node()->render_manager()->GetProxyToParent(); |
1326 if (!proxy) { | 1326 if (!proxy) { |
1327 bad_message::ReceivedBadMessage(GetProcess(), | 1327 bad_message::ReceivedBadMessage(GetProcess(), |
1328 bad_message::RFH_NO_PROXY_TO_PARENT); | 1328 bad_message::RFH_NO_PROXY_TO_PARENT); |
1329 return; | 1329 return; |
1330 } | 1330 } |
1331 | 1331 |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2119 // We may be returning to an existing NavigationEntry that had been granted | 2119 // We may be returning to an existing NavigationEntry that had been granted |
2120 // file access. If this is a different process, we will need to grant the | 2120 // file access. If this is a different process, we will need to grant the |
2121 // access again. The files listed in the page state are validated when they | 2121 // access again. The files listed in the page state are validated when they |
2122 // are received from the renderer to prevent abuse. | 2122 // are received from the renderer to prevent abuse. |
2123 if (request_params.page_state.IsValid()) { | 2123 if (request_params.page_state.IsValid()) { |
2124 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); | 2124 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); |
2125 } | 2125 } |
2126 } | 2126 } |
2127 | 2127 |
2128 } // namespace content | 2128 } // namespace content |
OLD | NEW |