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

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

Issue 379143002: PlzNavigate: implement RequestNavigation in the no live renderer case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed speculative rfh + no pending_navigation_entry dependency Created 6 years, 4 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h"
8 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
9 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
10 #include "base/metrics/user_metrics_action.h" 11 #include "base/metrics/user_metrics_action.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "content/browser/accessibility/accessibility_mode_helper.h" 13 #include "content/browser/accessibility/accessibility_mode_helper.h"
13 #include "content/browser/accessibility/browser_accessibility_manager.h" 14 #include "content/browser/accessibility/browser_accessibility_manager.h"
14 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 15 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
15 #include "content/browser/child_process_security_policy_impl.h" 16 #include "content/browser/child_process_security_policy_impl.h"
16 #include "content/browser/frame_host/cross_process_frame_connector.h" 17 #include "content/browser/frame_host/cross_process_frame_connector.h"
17 #include "content/browser/frame_host/cross_site_transferring_request.h" 18 #include "content/browser/frame_host/cross_site_transferring_request.h"
(...skipping 19 matching lines...) Expand all
37 #include "content/common/swapped_out_messages.h" 38 #include "content/common/swapped_out_messages.h"
38 #include "content/public/browser/ax_event_notification_details.h" 39 #include "content/public/browser/ax_event_notification_details.h"
39 #include "content/public/browser/browser_accessibility_state.h" 40 #include "content/public/browser/browser_accessibility_state.h"
40 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
41 #include "content/public/browser/content_browser_client.h" 42 #include "content/public/browser/content_browser_client.h"
42 #include "content/public/browser/desktop_notification_delegate.h" 43 #include "content/public/browser/desktop_notification_delegate.h"
43 #include "content/public/browser/render_process_host.h" 44 #include "content/public/browser/render_process_host.h"
44 #include "content/public/browser/render_widget_host_view.h" 45 #include "content/public/browser/render_widget_host_view.h"
45 #include "content/public/browser/user_metrics.h" 46 #include "content/public/browser/user_metrics.h"
46 #include "content/public/common/content_constants.h" 47 #include "content/public/common/content_constants.h"
48 #include "content/public/common/content_switches.h"
47 #include "content/public/common/url_constants.h" 49 #include "content/public/common/url_constants.h"
48 #include "content/public/common/url_utils.h" 50 #include "content/public/common/url_utils.h"
49 #include "ui/accessibility/ax_tree.h" 51 #include "ui/accessibility/ax_tree.h"
50 #include "url/gurl.h" 52 #include "url/gurl.h"
51 53
52 using base::TimeDelta; 54 using base::TimeDelta;
53 55
54 namespace content { 56 namespace content {
55 57
56 namespace { 58 namespace {
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 } 900 }
899 901
900 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) { 902 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) {
901 // This message is only sent for top-level frames. TODO(avi): when frame tree 903 // This message is only sent for top-level frames. TODO(avi): when frame tree
902 // mirroring works correctly, add a check here to enforce it. 904 // mirroring works correctly, add a check here to enforce it.
903 delegate_->UpdateEncoding(this, encoding_name); 905 delegate_->UpdateEncoding(this, encoding_name);
904 } 906 }
905 907
906 void RenderFrameHostImpl::OnBeginNavigation( 908 void RenderFrameHostImpl::OnBeginNavigation(
907 const FrameHostMsg_BeginNavigation_Params& params) { 909 const FrameHostMsg_BeginNavigation_Params& params) {
908 #if defined(USE_BROWSER_SIDE_NAVIGATION) 910 CHECK(CommandLine::ForCurrentProcess()->HasSwitch(
909 frame_tree_node()->render_manager()->OnBeginNavigation(params); 911 switches::kEnableBrowserSideNavigation));
910 #endif 912 frame_tree_node()->navigator()->OnBeginNavigation(this, params);
911 } 913 }
912 914
913 void RenderFrameHostImpl::OnAccessibilityEvents( 915 void RenderFrameHostImpl::OnAccessibilityEvents(
914 const std::vector<AccessibilityHostMsg_EventParams>& params) { 916 const std::vector<AccessibilityHostMsg_EventParams>& params) {
915 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( 917 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
916 render_view_host_->GetView()); 918 render_view_host_->GetView());
917 919
918 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); 920 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
919 if ((accessibility_mode != AccessibilityModeOff) && view && 921 if ((accessibility_mode != AccessibilityModeOff) && view &&
920 RenderViewHostImpl::IsRVHStateActive(render_view_host_->rvh_state())) { 922 RenderViewHostImpl::IsRVHStateActive(render_view_host_->rvh_state())) {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 FROM_HERE, 1197 FROM_HERE,
1196 base::Bind( 1198 base::Bind(
1197 &TransitionRequestManager::SetHasPendingTransitionRequest, 1199 &TransitionRequestManager::SetHasPendingTransitionRequest,
1198 base::Unretained(TransitionRequestManager::GetInstance()), 1200 base::Unretained(TransitionRequestManager::GetInstance()),
1199 GetProcess()->GetID(), 1201 GetProcess()->GetID(),
1200 routing_id_, 1202 routing_id_,
1201 has_pending_request)); 1203 has_pending_request));
1202 } 1204 }
1203 1205
1204 } // namespace content 1206 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698