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

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

Issue 367653002: Add a FrameHostMsg_BeginNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a stub for CommitNavigation to clarify lifetime of rfh Created 6 years, 5 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 18 matching lines...) Expand all
36 #include "content/common/swapped_out_messages.h" 37 #include "content/common/swapped_out_messages.h"
37 #include "content/public/browser/ax_event_notification_details.h" 38 #include "content/public/browser/ax_event_notification_details.h"
38 #include "content/public/browser/browser_accessibility_state.h" 39 #include "content/public/browser/browser_accessibility_state.h"
39 #include "content/public/browser/browser_thread.h" 40 #include "content/public/browser/browser_thread.h"
40 #include "content/public/browser/content_browser_client.h" 41 #include "content/public/browser/content_browser_client.h"
41 #include "content/public/browser/desktop_notification_delegate.h" 42 #include "content/public/browser/desktop_notification_delegate.h"
42 #include "content/public/browser/render_process_host.h" 43 #include "content/public/browser/render_process_host.h"
43 #include "content/public/browser/render_widget_host_view.h" 44 #include "content/public/browser/render_widget_host_view.h"
44 #include "content/public/browser/user_metrics.h" 45 #include "content/public/browser/user_metrics.h"
45 #include "content/public/common/content_constants.h" 46 #include "content/public/common/content_constants.h"
47 #include "content/public/common/content_switches.h"
46 #include "content/public/common/url_constants.h" 48 #include "content/public/common/url_constants.h"
47 #include "content/public/common/url_utils.h" 49 #include "content/public/common/url_utils.h"
48 #include "ui/accessibility/ax_tree.h" 50 #include "ui/accessibility/ax_tree.h"
49 #include "url/gurl.h" 51 #include "url/gurl.h"
50 52
51 using base::TimeDelta; 53 using base::TimeDelta;
52 54
53 namespace content { 55 namespace content {
54 56
55 namespace { 57 namespace {
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 847
846 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) { 848 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) {
847 // This message is only sent for top-level frames. TODO(avi): when frame tree 849 // This message is only sent for top-level frames. TODO(avi): when frame tree
848 // mirroring works correctly, add a check here to enforce it. 850 // mirroring works correctly, add a check here to enforce it.
849 delegate_->UpdateEncoding(this, encoding_name); 851 delegate_->UpdateEncoding(this, encoding_name);
850 } 852 }
851 853
852 854
853 void RenderFrameHostImpl::OnBeginNavigation( 855 void RenderFrameHostImpl::OnBeginNavigation(
854 const FrameHostMsg_BeginNavigation_Params& params) { 856 const FrameHostMsg_BeginNavigation_Params& params) {
855 #if defined(USE_BROWSER_SIDE_NAVIGATION) 857 if (CommandLine::ForCurrentProcess()->HasSwitch(
856 frame_tree_node()->render_manager()->OnBeginNavigation(params); 858 switches::kEnableBrowserSideNavigation)) {
857 #endif 859 frame_tree_node()->render_manager()->OnBeginNavigation(params);
860 }
858 } 861 }
859 862
860 void RenderFrameHostImpl::OnAccessibilityEvents( 863 void RenderFrameHostImpl::OnAccessibilityEvents(
861 const std::vector<AccessibilityHostMsg_EventParams>& params) { 864 const std::vector<AccessibilityHostMsg_EventParams>& params) {
862 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( 865 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
863 render_view_host_->GetView()); 866 render_view_host_->GetView());
864 867
865 868
866 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); 869 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
867 if ((accessibility_mode != AccessibilityModeOff) && view && 870 if ((accessibility_mode != AccessibilityModeOff) && view &&
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 FROM_HERE, 1146 FROM_HERE,
1144 base::Bind( 1147 base::Bind(
1145 &TransitionRequestManager::SetHasPendingTransitionRequest, 1148 &TransitionRequestManager::SetHasPendingTransitionRequest,
1146 base::Unretained(TransitionRequestManager::GetInstance()), 1149 base::Unretained(TransitionRequestManager::GetInstance()),
1147 GetProcess()->GetID(), 1150 GetProcess()->GetID(),
1148 routing_id_, 1151 routing_id_,
1149 has_pending_request)); 1152 has_pending_request));
1150 } 1153 }
1151 1154
1152 } // namespace content 1155 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('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