Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index 1e22e7ac615ba270ef530efb9bdd9f373b841b9b..e26cf20b76bac8d8b2ee960a7f7bc1f68bf86ac5 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -1030,10 +1030,11 @@ void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) { |
} |
void RenderFrameHostImpl::OnBeginNavigation( |
- const FrameHostMsg_BeginNavigation_Params& params) { |
+ const FrameHostMsg_BeginNavigation_Params& params, |
+ const CoreNavigationParams& core_params) { |
CHECK(CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnableBrowserSideNavigation)); |
- frame_tree_node()->render_manager()->OnBeginNavigation(params); |
+ frame_tree_node()->render_manager()->OnBeginNavigation(params, core_params); |
} |
void RenderFrameHostImpl::OnAccessibilityEvents( |
@@ -1173,8 +1174,8 @@ void RenderFrameHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { |
// so do not grant them the ability to request additional URLs. |
if (!GetProcess()->IsIsolatedGuest()) { |
ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
- GetProcess()->GetID(), params.url); |
- if (params.url.SchemeIs(url::kDataScheme) && |
+ GetProcess()->GetID(), params.core_params.url); |
+ if (params.core_params.url.SchemeIs(url::kDataScheme) && |
params.base_url_for_data_url.SchemeIs(url::kFileScheme)) { |
// If 'data:' is used, and we have a 'file:' base url, grant access to |
// local files. |
@@ -1211,20 +1212,20 @@ void RenderFrameHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { |
// |
// Blink doesn't send throb notifications for JavaScript URLs, so we |
// don't want to either. |
- if (!params.url.SchemeIs(url::kJavaScriptScheme)) |
+ if (!params.core_params.url.SchemeIs(url::kJavaScriptScheme)) |
delegate_->DidStartLoading(this, true); |
} |
void RenderFrameHostImpl::NavigateToURL(const GURL& url) { |
FrameMsg_Navigate_Params params; |
- params.page_id = -1; |
- params.pending_history_list_offset = -1; |
- params.current_history_list_offset = -1; |
- params.current_history_list_length = 0; |
- params.url = url; |
- params.transition = PAGE_TRANSITION_LINK; |
- params.navigation_type = FrameMsg_Navigate_Type::NORMAL; |
- params.browser_navigation_start = base::TimeTicks::Now(); |
+ params.commit_params.page_id = -1; |
+ params.commit_params.pending_history_list_offset = -1; |
+ params.commit_params.current_history_list_offset = -1; |
+ params.commit_params.current_history_list_length = 0; |
+ params.core_params.url = url; |
nasko
2014/09/22 23:13:03
nit: I'd put the core params before the commit one
clamy
2014/09/23 21:13:25
Done.
|
+ params.core_params.transition = PAGE_TRANSITION_LINK; |
+ params.core_params.navigation_type = FrameMsg_Navigate_Type::NORMAL; |
+ params.commit_params.browser_navigation_start = base::TimeTicks::Now(); |
nasko
2014/09/22 23:13:03
nit: move this up to the group of commit_* members
clamy
2014/09/23 21:13:25
Moved it above the history parameters as history p
|
Navigate(params); |
} |
@@ -1324,6 +1325,24 @@ void RenderFrameHostImpl::NotificationClosed(int notification_id) { |
cancel_notification_callbacks_.erase(notification_id); |
} |
+// PlzNavigate |
+void RenderFrameHostImpl::CommitNavigation( |
+ const GURL& stream_url, |
+ const CoreNavigationParams& core_params, |
+ const CommitNavigationParams& commit_params) { |
+ // TODO(clamy): Check if we have to add security checks for the browser plugin |
+ // guests. |
+ |
+ DCHECK(render_view_host_->rvh_state() == RenderViewHostImpl::STATE_DEFAULT); |
+ // Get back to a clean state, in case we start a new navigation without |
+ // completing a RVH swap or unload handler. |
+ render_view_host_->SetState(RenderViewHostImpl::STATE_DEFAULT); |
Charlie Reis
2014/09/19 23:12:31
As mentioned, please either remove this or add a T
clamy
2014/09/23 21:13:25
Done.
|
+ Send(new FrameMsg_CommitNavigation( |
+ routing_id_, stream_url, core_params, commit_params)); |
+ // TODO(clamy): Check if we should start the throbber for non javascript urls |
+ // here. |
+} |
+ |
void RenderFrameHostImpl::PlatformNotificationPermissionRequestDone( |
int request_id, blink::WebNotificationPermission permission) { |
Send(new PlatformNotificationMsg_PermissionRequestComplete( |
@@ -1463,7 +1482,8 @@ void RenderFrameHostImpl::SetNavigationsSuspended( |
render_view_host_->SetState(RenderViewHostImpl::STATE_DEFAULT); |
DCHECK(!proceed_time.is_null()); |
- suspended_nav_params_->browser_navigation_start = proceed_time; |
+ suspended_nav_params_->commit_params.browser_navigation_start = |
+ proceed_time; |
Send(new FrameMsg_Navigate(routing_id_, *suspended_nav_params_)); |
suspended_nav_params_.reset(); |
} |