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

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

Issue 615633005: PlzNavigate: Move the navigation logic to NavigatorImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@commit-nav
Patch Set: Addressed comments + moved unittests Created 6 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 "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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 // This message is only sent for top-level frames. TODO(avi): when frame tree 1049 // This message is only sent for top-level frames. TODO(avi): when frame tree
1050 // mirroring works correctly, add a check here to enforce it. 1050 // mirroring works correctly, add a check here to enforce it.
1051 delegate_->UpdateEncoding(this, encoding_name); 1051 delegate_->UpdateEncoding(this, encoding_name);
1052 } 1052 }
1053 1053
1054 void RenderFrameHostImpl::OnBeginNavigation( 1054 void RenderFrameHostImpl::OnBeginNavigation(
1055 const FrameHostMsg_BeginNavigation_Params& params, 1055 const FrameHostMsg_BeginNavigation_Params& params,
1056 const CommonNavigationParams& common_params) { 1056 const CommonNavigationParams& common_params) {
1057 CHECK(CommandLine::ForCurrentProcess()->HasSwitch( 1057 CHECK(CommandLine::ForCurrentProcess()->HasSwitch(
1058 switches::kEnableBrowserSideNavigation)); 1058 switches::kEnableBrowserSideNavigation));
1059 frame_tree_node()->render_manager()->OnBeginNavigation(params, common_params); 1059 frame_tree_node()->navigator()->OnBeginNavigation(
1060 frame_tree_node(), params, common_params);
1060 } 1061 }
1061 1062
1062 void RenderFrameHostImpl::OnAccessibilityEvents( 1063 void RenderFrameHostImpl::OnAccessibilityEvents(
1063 const std::vector<AccessibilityHostMsg_EventParams>& params) { 1064 const std::vector<AccessibilityHostMsg_EventParams>& params) {
1064 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( 1065 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
1065 render_view_host_->GetView()); 1066 render_view_host_->GetView());
1066 1067
1067 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); 1068 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
1068 if ((accessibility_mode != AccessibilityModeOff) && view && 1069 if ((accessibility_mode != AccessibilityModeOff) && view &&
1069 RenderFrameHostImpl::IsRFHStateActive(rfh_state())) { 1070 RenderFrameHostImpl::IsRFHStateActive(rfh_state())) {
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 // Clear any state if a pending navigation is canceled or preempted. 1539 // Clear any state if a pending navigation is canceled or preempted.
1539 if (suspended_nav_params_) 1540 if (suspended_nav_params_)
1540 suspended_nav_params_.reset(); 1541 suspended_nav_params_.reset();
1541 1542
1542 TRACE_EVENT_ASYNC_END0("navigation", 1543 TRACE_EVENT_ASYNC_END0("navigation",
1543 "RenderFrameHostImpl navigation suspended", this); 1544 "RenderFrameHostImpl navigation suspended", this);
1544 navigations_suspended_ = false; 1545 navigations_suspended_ = false;
1545 } 1546 }
1546 1547
1547 } // namespace content 1548 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698