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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2397893002: Revert the merge of CrossSiteResourceHandler and NavigationResourceThrottle. (Closed)
Patch Set: Add back initialization of started_from_context_menu_. Created 4 years, 2 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
15 #include "base/process/kill.h" 15 #include "base/process/kill.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "content/browser/accessibility/accessibility_mode_helper.h" 18 #include "content/browser/accessibility/accessibility_mode_helper.h"
19 #include "content/browser/accessibility/ax_tree_id_registry.h" 19 #include "content/browser/accessibility/ax_tree_id_registry.h"
20 #include "content/browser/accessibility/browser_accessibility_manager.h" 20 #include "content/browser/accessibility/browser_accessibility_manager.h"
21 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 21 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
22 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" 22 #include "content/browser/bluetooth/web_bluetooth_service_impl.h"
23 #include "content/browser/child_process_security_policy_impl.h" 23 #include "content/browser/child_process_security_policy_impl.h"
24 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 24 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
25 #include "content/browser/download/mhtml_generation_manager.h" 25 #include "content/browser/download/mhtml_generation_manager.h"
26 #include "content/browser/frame_host/cross_process_frame_connector.h" 26 #include "content/browser/frame_host/cross_process_frame_connector.h"
27 #include "content/browser/frame_host/cross_site_transferring_request.h"
27 #include "content/browser/frame_host/debug_urls.h" 28 #include "content/browser/frame_host/debug_urls.h"
28 #include "content/browser/frame_host/frame_tree.h" 29 #include "content/browser/frame_host/frame_tree.h"
29 #include "content/browser/frame_host/frame_tree_node.h" 30 #include "content/browser/frame_host/frame_tree_node.h"
30 #include "content/browser/frame_host/navigation_entry_impl.h" 31 #include "content/browser/frame_host/navigation_entry_impl.h"
31 #include "content/browser/frame_host/navigation_handle_impl.h" 32 #include "content/browser/frame_host/navigation_handle_impl.h"
32 #include "content/browser/frame_host/navigation_request.h" 33 #include "content/browser/frame_host/navigation_request.h"
33 #include "content/browser/frame_host/navigator.h" 34 #include "content/browser/frame_host/navigator.h"
34 #include "content/browser/frame_host/navigator_impl.h" 35 #include "content/browser/frame_host/navigator_impl.h"
35 #include "content/browser/frame_host/render_frame_host_delegate.h" 36 #include "content/browser/frame_host/render_frame_host_delegate.h"
36 #include "content/browser/frame_host/render_frame_proxy_host.h" 37 #include "content/browser/frame_host/render_frame_proxy_host.h"
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 return GlobalFrameRoutingId(GetProcess()->GetID(), GetRoutingID()); 1291 return GlobalFrameRoutingId(GetProcess()->GetID(), GetRoutingID());
1291 } 1292 }
1292 1293
1293 int RenderFrameHostImpl::GetEnabledBindings() { 1294 int RenderFrameHostImpl::GetEnabledBindings() {
1294 return render_view_host_->GetEnabledBindings(); 1295 return render_view_host_->GetEnabledBindings();
1295 } 1296 }
1296 1297
1297 void RenderFrameHostImpl::SetNavigationHandle( 1298 void RenderFrameHostImpl::SetNavigationHandle(
1298 std::unique_ptr<NavigationHandleImpl> navigation_handle) { 1299 std::unique_ptr<NavigationHandleImpl> navigation_handle) {
1299 navigation_handle_ = std::move(navigation_handle); 1300 navigation_handle_ = std::move(navigation_handle);
1301 if (navigation_handle_)
1302 navigation_handle_->set_render_frame_host(this);
1300 } 1303 }
1301 1304
1302 std::unique_ptr<NavigationHandleImpl> 1305 std::unique_ptr<NavigationHandleImpl>
1303 RenderFrameHostImpl::PassNavigationHandleOwnership() { 1306 RenderFrameHostImpl::PassNavigationHandleOwnership() {
1304 DCHECK(!IsBrowserSideNavigationEnabled()); 1307 DCHECK(!IsBrowserSideNavigationEnabled());
1305 if (navigation_handle_) 1308 if (navigation_handle_)
1306 navigation_handle_->set_is_transferring(true); 1309 navigation_handle_->set_is_transferring(true);
1307 return std::move(navigation_handle_); 1310 return std::move(navigation_handle_);
1308 } 1311 }
1309 1312
1313 void RenderFrameHostImpl::OnCrossSiteResponse(
1314 const GlobalRequestID& global_request_id,
1315 std::unique_ptr<CrossSiteTransferringRequest>
1316 cross_site_transferring_request,
1317 const std::vector<GURL>& transfer_url_chain,
1318 const Referrer& referrer,
1319 ui::PageTransition page_transition,
1320 bool should_replace_current_entry) {
1321 frame_tree_node_->render_manager()->OnCrossSiteResponse(
1322 this, global_request_id, std::move(cross_site_transferring_request),
1323 transfer_url_chain, referrer, page_transition,
1324 should_replace_current_entry);
1325 }
1326
1310 void RenderFrameHostImpl::SwapOut( 1327 void RenderFrameHostImpl::SwapOut(
1311 RenderFrameProxyHost* proxy, 1328 RenderFrameProxyHost* proxy,
1312 bool is_loading) { 1329 bool is_loading) {
1313 // The end of this event is in OnSwapOutACK when the RenderFrame has completed 1330 // The end of this event is in OnSwapOutACK when the RenderFrame has completed
1314 // the operation and sends back an IPC message. 1331 // the operation and sends back an IPC message.
1315 // The trace event may not end properly if the ACK times out. We expect this 1332 // The trace event may not end properly if the ACK times out. We expect this
1316 // to be fixed when RenderViewHostImpl::OnSwapOut moves to RenderFrameHost. 1333 // to be fixed when RenderViewHostImpl::OnSwapOut moves to RenderFrameHost.
1317 TRACE_EVENT_ASYNC_BEGIN0("navigation", "RenderFrameHostImpl::SwapOut", this); 1334 TRACE_EVENT_ASYNC_BEGIN0("navigation", "RenderFrameHostImpl::SwapOut", this);
1318 1335
1319 // If this RenderFrameHost is already pending deletion, it must have already 1336 // If this RenderFrameHost is already pending deletion, it must have already
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3105 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3089 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3106 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3090 return web_bluetooth_service_.get(); 3107 return web_bluetooth_service_.get();
3091 } 3108 }
3092 3109
3093 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3110 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3094 web_bluetooth_service_.reset(); 3111 web_bluetooth_service_.reset();
3095 } 3112 }
3096 3113
3097 } // namespace content 3114 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_frame_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698