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

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

Issue 18179004: Dismiss action in tab modal dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make the tests pass with GTK and Cocoa Created 7 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 (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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void RepostFormWarningController::OnAccepted() { 46 void RepostFormWarningController::OnAccepted() {
47 operations_delegate()->SetPreventCloseOnLoadStart(true); 47 operations_delegate()->SetPreventCloseOnLoadStart(true);
48 web_contents()->GetController().ContinuePendingReload(); 48 web_contents()->GetController().ContinuePendingReload();
49 operations_delegate()->SetPreventCloseOnLoadStart(false); 49 operations_delegate()->SetPreventCloseOnLoadStart(false);
50 } 50 }
51 51
52 void RepostFormWarningController::OnCanceled() { 52 void RepostFormWarningController::OnCanceled() {
53 web_contents()->GetController().CancelPendingReload(); 53 web_contents()->GetController().CancelPendingReload();
54 } 54 }
55 55
56 void RepostFormWarningController::OnClosed() {
57 web_contents()->GetController().CancelPendingReload();
58 }
59
56 void RepostFormWarningController::BeforeFormRepostWarningShow() { 60 void RepostFormWarningController::BeforeFormRepostWarningShow() {
57 // Close the dialog if we show an additional dialog, to avoid them 61 // Close the dialog if we show an additional dialog, to avoid them
58 // stacking up. 62 // stacking up.
59 Cancel(); 63 Cancel();
60 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698