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

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 6904039: Update the URL if the user cancels a beforeunload handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing file. Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer_host/render_view_host.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 return; 1318 return;
1319 1319
1320 is_waiting_for_beforeunload_ack_ = false; 1320 is_waiting_for_beforeunload_ack_ = false;
1321 1321
1322 RenderViewHostDelegate::RendererManagement* management_delegate = 1322 RenderViewHostDelegate::RendererManagement* management_delegate =
1323 delegate_->GetRendererManagementDelegate(); 1323 delegate_->GetRendererManagementDelegate();
1324 if (management_delegate) { 1324 if (management_delegate) {
1325 management_delegate->ShouldClosePage( 1325 management_delegate->ShouldClosePage(
1326 unload_ack_is_for_cross_site_transition_, proceed); 1326 unload_ack_is_for_cross_site_transition_, proceed);
1327 } 1327 }
1328
1329 // If canceled, notify the delegate to cancel its pending navigation entry.
1330 if (!proceed)
1331 delegate_->DidCancelLoading();
1328 } 1332 }
1329 1333
1330 void RenderViewHost::WindowMoveOrResizeStarted() { 1334 void RenderViewHost::WindowMoveOrResizeStarted() {
1331 Send(new ViewMsg_MoveOrResizeStarted(routing_id())); 1335 Send(new ViewMsg_MoveOrResizeStarted(routing_id()));
1332 } 1336 }
1333 1337
1334 void RenderViewHost::NotifyRendererUnresponsive() { 1338 void RenderViewHost::NotifyRendererUnresponsive() {
1335 delegate_->RendererUnresponsive( 1339 delegate_->RendererUnresponsive(
1336 this, is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_); 1340 this, is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_);
1337 } 1341 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 LOG(DFATAL) << "Invalid checked state " << checked_state; 1623 LOG(DFATAL) << "Invalid checked state " << checked_state;
1620 return; 1624 return;
1621 } 1625 }
1622 1626
1623 CommandState state; 1627 CommandState state;
1624 state.is_enabled = is_enabled; 1628 state.is_enabled = is_enabled;
1625 state.checked_state = 1629 state.checked_state =
1626 static_cast<RenderViewCommandCheckedState>(checked_state); 1630 static_cast<RenderViewCommandCheckedState>(checked_state);
1627 command_states_[static_cast<RenderViewCommand>(command)] = state; 1631 command_states_[static_cast<RenderViewCommand>(command)] = state;
1628 } 1632 }
OLDNEW
« no previous file with comments | « chrome/test/data/beforeunload.html ('k') | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698