[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_ | ||||
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 7 | |
[email protected] | 49fd7e2 | 2011-11-21 16:52:21 | [diff] [blame] | 8 | #include "base/compiler_specific.h" |
[email protected] | 67baffc8 | 2011-12-19 18:03:07 | [diff] [blame] | 9 | #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 10 | #include "content/public/browser/web_contents_observer.h" |
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 11 | |
12 | // This class is used to continue or cancel a pending reload when the | ||||
[email protected] | 1237c0d5 | 2012-05-25 21:37:32 | [diff] [blame] | 13 | // repost form warning is shown. It is owned by the platform-specific |
14 | // |TabModalConfirmDialog{Gtk, Mac, Views, WebUI}| classes. | ||||
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 15 | class RepostFormWarningController : public TabModalConfirmDialogDelegate, |
16 | public content::WebContentsObserver { | ||||
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 17 | public: |
[email protected] | 2a6bc3e | 2011-12-28 23:51:33 | [diff] [blame] | 18 | explicit RepostFormWarningController(content::WebContents* web_contents); |
[email protected] | b535bf1e | 2010-04-14 16:19:40 | [diff] [blame] | 19 | virtual ~RepostFormWarningController(); |
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 20 | |
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 21 | private: |
[email protected] | 67baffc8 | 2011-12-19 18:03:07 | [diff] [blame] | 22 | // TabModalConfirmDialogDelegate methods: |
mostynb | fb66cb4f | 2014-10-07 09:15:42 | [diff] [blame] | 23 | virtual base::string16 GetTitle() override; |
24 | virtual base::string16 GetDialogMessage() override; | ||||
25 | virtual base::string16 GetAcceptButtonTitle() override; | ||||
26 | virtual void OnAccepted() override; | ||||
27 | virtual void OnCanceled() override; | ||||
28 | virtual void OnClosed() override; | ||||
[email protected] | 9d4984e | 2011-08-24 19:16:02 | [diff] [blame] | 29 | |
[email protected] | 17e286e | 2013-03-01 23:29:39 | [diff] [blame] | 30 | // content::WebContentsObserver methods: |
mostynb | fb66cb4f | 2014-10-07 09:15:42 | [diff] [blame] | 31 | virtual void BeforeFormRepostWarningShow() override; |
[email protected] | 965bb09 | 2010-04-09 11:59:02 | [diff] [blame] | 32 | |
33 | DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController); | ||||
34 | }; | ||||
35 | |||||
36 | #endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ |