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

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: 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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 // This message is only sent for top-level frames. TODO(avi): when frame tree 1018 // This message is only sent for top-level frames. TODO(avi): when frame tree
1019 // mirroring works correctly, add a check here to enforce it. 1019 // mirroring works correctly, add a check here to enforce it.
1020 delegate_->UpdateEncoding(this, encoding_name); 1020 delegate_->UpdateEncoding(this, encoding_name);
1021 } 1021 }
1022 1022
1023 void RenderFrameHostImpl::OnBeginNavigation( 1023 void RenderFrameHostImpl::OnBeginNavigation(
1024 const FrameHostMsg_BeginNavigation_Params& params, 1024 const FrameHostMsg_BeginNavigation_Params& params,
1025 const CommonNavigationParams& common_params) { 1025 const CommonNavigationParams& common_params) {
1026 CHECK(CommandLine::ForCurrentProcess()->HasSwitch( 1026 CHECK(CommandLine::ForCurrentProcess()->HasSwitch(
1027 switches::kEnableBrowserSideNavigation)); 1027 switches::kEnableBrowserSideNavigation));
1028 frame_tree_node()->render_manager()->OnBeginNavigation(params, common_params); 1028 frame_tree_node()->navigator()->OnBeginNavigation(
1029 frame_tree_node(), params, common_params);
carlosk 2014/10/01 18:31:10 Noob question: if we really want to move all of na
clamy 2014/10/01 22:30:46 I think it is better to keep the IPC handling in R
1029 } 1030 }
1030 1031
1031 void RenderFrameHostImpl::OnAccessibilityEvents( 1032 void RenderFrameHostImpl::OnAccessibilityEvents(
1032 const std::vector<AccessibilityHostMsg_EventParams>& params) { 1033 const std::vector<AccessibilityHostMsg_EventParams>& params) {
1033 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( 1034 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
1034 render_view_host_->GetView()); 1035 render_view_host_->GetView());
1035 1036
1036 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); 1037 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
1037 if ((accessibility_mode != AccessibilityModeOff) && view && 1038 if ((accessibility_mode != AccessibilityModeOff) && view &&
1038 RenderViewHostImpl::IsRVHStateActive(render_view_host_->rvh_state())) { 1039 RenderViewHostImpl::IsRVHStateActive(render_view_host_->rvh_state())) {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 // Clear any state if a pending navigation is canceled or preempted. 1481 // Clear any state if a pending navigation is canceled or preempted.
1481 if (suspended_nav_params_) 1482 if (suspended_nav_params_)
1482 suspended_nav_params_.reset(); 1483 suspended_nav_params_.reset();
1483 1484
1484 TRACE_EVENT_ASYNC_END0("navigation", 1485 TRACE_EVENT_ASYNC_END0("navigation",
1485 "RenderFrameHostImpl navigation suspended", this); 1486 "RenderFrameHostImpl navigation suspended", this);
1486 navigations_suspended_ = false; 1487 navigations_suspended_ = false;
1487 } 1488 }
1488 1489
1489 } // namespace content 1490 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698