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

Side by Side Diff: trunk/src/chrome/browser/repost_form_warning_controller.cc

Issue 21372006: Revert 212329 "Reland "Close web contents modal dialogs on conte..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 "chrome/browser/repost_form_warning_controller.h" 5 #include "chrome/browser/repost_form_warning_controller.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 27 matching lines...) Expand all
38 const char* RepostFormWarningController::GetAcceptButtonIcon() { 38 const char* RepostFormWarningController::GetAcceptButtonIcon() {
39 return GTK_STOCK_REFRESH; 39 return GTK_STOCK_REFRESH;
40 } 40 }
41 41
42 const char* RepostFormWarningController::GetCancelButtonIcon() { 42 const char* RepostFormWarningController::GetCancelButtonIcon() {
43 return GTK_STOCK_CANCEL; 43 return GTK_STOCK_CANCEL;
44 } 44 }
45 #endif // defined(TOOLKIT_GTK) 45 #endif // defined(TOOLKIT_GTK)
46 46
47 void RepostFormWarningController::OnAccepted() { 47 void RepostFormWarningController::OnAccepted() {
48 operations_delegate()->SetPreventCloseOnLoadStart(true);
49 web_contents()->GetController().ContinuePendingReload(); 48 web_contents()->GetController().ContinuePendingReload();
50 operations_delegate()->SetPreventCloseOnLoadStart(false);
51 } 49 }
52 50
53 void RepostFormWarningController::OnCanceled() { 51 void RepostFormWarningController::OnCanceled() {
54 web_contents()->GetController().CancelPendingReload(); 52 web_contents()->GetController().CancelPendingReload();
55 } 53 }
56 54
57 void RepostFormWarningController::BeforeFormRepostWarningShow() { 55 void RepostFormWarningController::BeforeFormRepostWarningShow() {
58 // Close the dialog if we show an additional dialog, to avoid them 56 // Close the dialog if we show an additional dialog, to avoid them
59 // stacking up. 57 // stacking up.
60 Cancel(); 58 Cancel();
61 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698