OLD | NEW |
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 #include "chrome/grit/generated_resources.h" | 7 #include "components/strings/grit/components_strings.h" |
8 #include "content/public/browser/navigation_controller.h" | 8 #include "content/public/browser/navigation_controller.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
11 | 11 |
12 RepostFormWarningController::RepostFormWarningController( | 12 RepostFormWarningController::RepostFormWarningController( |
13 content::WebContents* web_contents) | 13 content::WebContents* web_contents) |
14 : TabModalConfirmDialogDelegate(web_contents), | 14 : TabModalConfirmDialogDelegate(web_contents), |
15 content::WebContentsObserver(web_contents) { | 15 content::WebContentsObserver(web_contents) { |
16 } | 16 } |
17 | 17 |
(...skipping 22 matching lines...) Expand all Loading... |
40 | 40 |
41 void RepostFormWarningController::OnClosed() { | 41 void RepostFormWarningController::OnClosed() { |
42 web_contents()->GetController().CancelPendingReload(); | 42 web_contents()->GetController().CancelPendingReload(); |
43 } | 43 } |
44 | 44 |
45 void RepostFormWarningController::BeforeFormRepostWarningShow() { | 45 void RepostFormWarningController::BeforeFormRepostWarningShow() { |
46 // Close the dialog if we show an additional dialog, to avoid them | 46 // Close the dialog if we show an additional dialog, to avoid them |
47 // stacking up. | 47 // stacking up. |
48 Cancel(); | 48 Cancel(); |
49 } | 49 } |
OLD | NEW |