| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ | 6 #define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 9 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| 11 | 11 |
| 12 // This class is used to continue or cancel a pending reload when the | 12 // This class is used to continue or cancel a pending reload when the |
| 13 // repost form warning is shown. It is owned by the platform-specific | 13 // repost form warning is shown. It is owned by the platform-specific |
| 14 // |TabModalConfirmDialog{Gtk, Mac, Views, WebUI}| classes. | 14 // |TabModalConfirmDialog{Gtk, Mac, Views, WebUI}| classes. |
| 15 class RepostFormWarningController : public TabModalConfirmDialogDelegate, | 15 class RepostFormWarningController : public TabModalConfirmDialogDelegate, |
| 16 public content::WebContentsObserver { | 16 public content::WebContentsObserver { |
| 17 public: | 17 public: |
| 18 explicit RepostFormWarningController(content::WebContents* web_contents); | 18 explicit RepostFormWarningController(content::WebContents* web_contents); |
| 19 virtual ~RepostFormWarningController(); | 19 virtual ~RepostFormWarningController(); |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 // TabModalConfirmDialogDelegate methods: | 22 // TabModalConfirmDialogDelegate methods: |
| 23 virtual base::string16 GetTitle() OVERRIDE; | 23 virtual base::string16 GetTitle() OVERRIDE; |
| 24 virtual base::string16 GetDialogMessage() OVERRIDE; | 24 virtual base::string16 GetDialogMessage() OVERRIDE; |
| 25 virtual base::string16 GetAcceptButtonTitle() OVERRIDE; | 25 virtual base::string16 GetAcceptButtonTitle() OVERRIDE; |
| 26 #if defined(TOOLKIT_GTK) | |
| 27 virtual const char* GetAcceptButtonIcon() OVERRIDE; | |
| 28 virtual const char* GetCancelButtonIcon() OVERRIDE; | |
| 29 #endif // defined(TOOLKIT_GTK) | |
| 30 virtual void OnAccepted() OVERRIDE; | 26 virtual void OnAccepted() OVERRIDE; |
| 31 virtual void OnCanceled() OVERRIDE; | 27 virtual void OnCanceled() OVERRIDE; |
| 32 virtual void OnClosed() OVERRIDE; | 28 virtual void OnClosed() OVERRIDE; |
| 33 | 29 |
| 34 // content::WebContentsObserver methods: | 30 // content::WebContentsObserver methods: |
| 35 virtual void BeforeFormRepostWarningShow() OVERRIDE; | 31 virtual void BeforeFormRepostWarningShow() OVERRIDE; |
| 36 | 32 |
| 37 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController); | 33 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController); |
| 38 }; | 34 }; |
| 39 | 35 |
| 40 #endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ | 36 #endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ |
| OLD | NEW |