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

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

Issue 483773002: PlzNavigate: implement CommitNavigation on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split the class into structs used by IPCs Created 6 years, 3 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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 render_view_host_->delegate_->RendererUnresponsive( 1216 render_view_host_->delegate_->RendererUnresponsive(
1217 render_view_host_, 1217 render_view_host_,
1218 render_view_host_->is_waiting_for_beforeunload_ack(), 1218 render_view_host_->is_waiting_for_beforeunload_ack(),
1219 render_view_host_->IsWaitingForUnloadACK()); 1219 render_view_host_->IsWaitingForUnloadACK());
1220 } 1220 }
1221 1221
1222 void RenderFrameHostImpl::NotificationClosed(int notification_id) { 1222 void RenderFrameHostImpl::NotificationClosed(int notification_id) {
1223 cancel_notification_callbacks_.erase(notification_id); 1223 cancel_notification_callbacks_.erase(notification_id);
1224 } 1224 }
1225 1225
1226 // PlzNavigate
1227 void RenderFrameHostImpl::CommitNavigation(
1228 const FrameMsg_CommitNavigation_Params& params) {
1229 // TODO(clamy): Check if we have to add security checks for the browser plugin
1230 // guests.
1231
1232 DCHECK(render_view_host_->rvh_state() == RenderViewHostImpl::STATE_DEFAULT);
1233 // Get back to a clean state, in case we start a new navigation without
1234 // completing a RVH swap or unload handler.
1235 render_view_host_->SetState(RenderViewHostImpl::STATE_DEFAULT);
Charlie Reis 2014/09/15 21:19:39 I don't understand this state transition. The des
clamy 2014/09/18 20:50:39 Right now we are swapping it in RFHM::CommitNaviga
Charlie Reis 2014/09/19 23:12:31 Making that change in another CL is fine, but I do
1236 Send(new FrameMsg_CommitNavigation(routing_id_, params));
1237 // TODO(clamy): Check if we have to be concerned about throbbing javascript
Charlie Reis 2014/09/15 21:19:39 What does this mean?
1238 // urls.
1239 }
1240
1226 void RenderFrameHostImpl::PlatformNotificationPermissionRequestDone( 1241 void RenderFrameHostImpl::PlatformNotificationPermissionRequestDone(
1227 int request_id, blink::WebNotificationPermission permission) { 1242 int request_id, blink::WebNotificationPermission permission) {
1228 Send(new PlatformNotificationMsg_PermissionRequestComplete( 1243 Send(new PlatformNotificationMsg_PermissionRequestComplete(
1229 routing_id_, request_id, permission)); 1244 routing_id_, request_id, permission));
1230 } 1245 }
1231 1246
1232 void RenderFrameHostImpl::SetAccessibilityMode(AccessibilityMode mode) { 1247 void RenderFrameHostImpl::SetAccessibilityMode(AccessibilityMode mode) {
1233 Send(new FrameMsg_SetAccessibilityMode(routing_id_, mode)); 1248 Send(new FrameMsg_SetAccessibilityMode(routing_id_, mode));
1234 } 1249 }
1235 1250
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 // Clear any state if a pending navigation is canceled or preempted. 1351 // Clear any state if a pending navigation is canceled or preempted.
1337 if (suspended_nav_params_) 1352 if (suspended_nav_params_)
1338 suspended_nav_params_.reset(); 1353 suspended_nav_params_.reset();
1339 1354
1340 TRACE_EVENT_ASYNC_END0("navigation", 1355 TRACE_EVENT_ASYNC_END0("navigation",
1341 "RenderFrameHostImpl navigation suspended", this); 1356 "RenderFrameHostImpl navigation suspended", this);
1342 navigations_suspended_ = false; 1357 navigations_suspended_ = false;
1343 } 1358 }
1344 1359
1345 } // namespace content 1360 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698