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

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: Addressed Nasko's comments 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/child_process_security_policy_impl.h" 13 #include "content/browser/child_process_security_policy_impl.h"
13 #include "content/browser/frame_host/cross_process_frame_connector.h" 14 #include "content/browser/frame_host/cross_process_frame_connector.h"
14 #include "content/browser/frame_host/cross_site_transferring_request.h" 15 #include "content/browser/frame_host/cross_site_transferring_request.h"
15 #include "content/browser/frame_host/frame_tree.h" 16 #include "content/browser/frame_host/frame_tree.h"
16 #include "content/browser/frame_host/frame_tree_node.h" 17 #include "content/browser/frame_host/frame_tree_node.h"
17 #include "content/browser/frame_host/navigator.h" 18 #include "content/browser/frame_host/navigator.h"
(...skipping 11 matching lines...) Expand all
29 #include "content/common/inter_process_time_ticks_converter.h" 30 #include "content/common/inter_process_time_ticks_converter.h"
30 #include "content/common/render_frame_setup.mojom.h" 31 #include "content/common/render_frame_setup.mojom.h"
31 #include "content/common/swapped_out_messages.h" 32 #include "content/common/swapped_out_messages.h"
32 #include "content/public/browser/browser_thread.h" 33 #include "content/public/browser/browser_thread.h"
33 #include "content/public/browser/content_browser_client.h" 34 #include "content/public/browser/content_browser_client.h"
34 #include "content/public/browser/desktop_notification_delegate.h" 35 #include "content/public/browser/desktop_notification_delegate.h"
35 #include "content/public/browser/render_process_host.h" 36 #include "content/public/browser/render_process_host.h"
36 #include "content/public/browser/render_widget_host_view.h" 37 #include "content/public/browser/render_widget_host_view.h"
37 #include "content/public/browser/user_metrics.h" 38 #include "content/public/browser/user_metrics.h"
38 #include "content/public/common/content_constants.h" 39 #include "content/public/common/content_constants.h"
40 #include "content/public/common/content_switches.h"
39 #include "content/public/common/url_constants.h" 41 #include "content/public/common/url_constants.h"
40 #include "content/public/common/url_utils.h" 42 #include "content/public/common/url_utils.h"
41 #include "url/gurl.h" 43 #include "url/gurl.h"
42 44
43 using base::TimeDelta; 45 using base::TimeDelta;
44 46
45 namespace content { 47 namespace content {
46 48
47 namespace { 49 namespace {
48 50
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 } 769 }
768 770
769 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) { 771 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) {
770 // This message is only sent for top-level frames. TODO(avi): when frame tree 772 // This message is only sent for top-level frames. TODO(avi): when frame tree
771 // mirroring works correctly, add a check here to enforce it. 773 // mirroring works correctly, add a check here to enforce it.
772 delegate_->UpdateEncoding(this, encoding_name); 774 delegate_->UpdateEncoding(this, encoding_name);
773 } 775 }
774 776
775 void RenderFrameHostImpl::OnBeginNavigation( 777 void RenderFrameHostImpl::OnBeginNavigation(
776 const FrameHostMsg_BeginNavigation_Params& params) { 778 const FrameHostMsg_BeginNavigation_Params& params) {
777 #if defined(USE_BROWSER_SIDE_NAVIGATION) 779 if (CommandLine::ForCurrentProcess()->HasSwitch(
778 frame_tree_node()->render_manager()->OnBeginNavigation(params); 780 switches::kEnableBrowserSideNavigation)) {
779 #endif 781 frame_tree_node()->render_manager()->OnBeginNavigation(params);
782 }
780 } 783 }
781 784
782 void RenderFrameHostImpl::SetPendingShutdown(const base::Closure& on_swap_out) { 785 void RenderFrameHostImpl::SetPendingShutdown(const base::Closure& on_swap_out) {
783 render_view_host_->SetPendingShutdown(on_swap_out); 786 render_view_host_->SetPendingShutdown(on_swap_out);
784 } 787 }
785 788
786 bool RenderFrameHostImpl::CanCommitURL(const GURL& url) { 789 bool RenderFrameHostImpl::CanCommitURL(const GURL& url) {
787 // TODO(creis): We should also check for WebUI pages here. Also, when the 790 // TODO(creis): We should also check for WebUI pages here. Also, when the
788 // out-of-process iframes implementation is ready, we should check for 791 // out-of-process iframes implementation is ready, we should check for
789 // cross-site URLs that are not allowed to commit in this process. 792 // cross-site URLs that are not allowed to commit in this process.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 FROM_HERE, 956 FROM_HERE,
954 base::Bind( 957 base::Bind(
955 &TransitionRequestManager::SetHasPendingTransitionRequest, 958 &TransitionRequestManager::SetHasPendingTransitionRequest,
956 base::Unretained(TransitionRequestManager::GetInstance()), 959 base::Unretained(TransitionRequestManager::GetInstance()),
957 GetProcess()->GetID(), 960 GetProcess()->GetID(),
958 routing_id_, 961 routing_id_,
959 has_pending_request)); 962 has_pending_request));
960 } 963 }
961 964
962 } // namespace content 965 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698