[email protected] | 1237c0d5 | 2012-05-25 21:37:32 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ | ||||
6 | #define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ | ||||
7 | |||||
[email protected] | 49fd7e2 | 2011-11-21 16:52:21 | [diff] [blame] | 8 | #include "base/compiler_specific.h" |
avi | b896c71 | 2015-12-26 02:10:43 | [diff] [blame] | 9 | #include "base/macros.h" |
[email protected] | 67baffc8 | 2011-12-19 18:03:07 | [diff] [blame] | 10 | #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 11 | #include "content/public/browser/web_contents_observer.h" |
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 12 | |
13 | // This class is used to continue or cancel a pending reload when the | ||||
[email protected] | 1237c0d5 | 2012-05-25 21:37:32 | [diff] [blame] | 14 | // repost form warning is shown. It is owned by the platform-specific |
15 | // |TabModalConfirmDialog{Gtk, Mac, Views, WebUI}| classes. | ||||
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 16 | class RepostFormWarningController : public TabModalConfirmDialogDelegate, |
17 | public content::WebContentsObserver { | ||||
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 18 | public: |
[email protected] | 2a6bc3e | 2011-12-28 23:51:33 | [diff] [blame] | 19 | explicit RepostFormWarningController(content::WebContents* web_contents); |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 20 | ~RepostFormWarningController() override; |
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 21 | |
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 22 | private: |
[email protected] | 67baffc8 | 2011-12-19 18:03:07 | [diff] [blame] | 23 | // TabModalConfirmDialogDelegate methods: |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 24 | base::string16 GetTitle() override; |
25 | base::string16 GetDialogMessage() override; | ||||
26 | base::string16 GetAcceptButtonTitle() override; | ||||
27 | void OnAccepted() override; | ||||
28 | void OnCanceled() override; | ||||
29 | void OnClosed() override; | ||||
[email protected] | 9d4984e | 2011-08-24 19:16:02 | [diff] [blame] | 30 | |
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 31 | // content::WebContentsObserver methods: |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 32 | void BeforeFormRepostWarningShow() override; |
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 33 | |
34 | DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController); | ||||
35 | }; | ||||
36 | |||||
37 | #endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ |