OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_REPOST_FORM_WARNING_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_REPOST_FORM_WARNING_UI_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 |
| 12 class BrowserWindow; |
| 13 class RepostFormWarningController; |
| 14 class TabContents; |
| 15 |
| 16 namespace browser { |
| 17 void ShowRepostFormWarningDialog(gfx::NativeWindow parent_window, |
| 18 TabContents* tab_contents); |
| 19 } |
| 20 |
| 21 // Displays a dialog that warns the user that they are about to resubmit |
| 22 // a form. |
| 23 // To display the dialog, allocate this object on the heap. It will open the |
| 24 // dialog from its constructor and then delete itself when the user dismisses |
| 25 // the dialog. |
| 26 class RepostFormWarningUI { |
| 27 public: |
| 28 // Invoked when the dialog is closed. Notifies the controller of the user's |
| 29 // response and deletes this object. |
| 30 void OnDialogClosed(bool repost); |
| 31 |
| 32 private: |
| 33 friend void browser::ShowRepostFormWarningDialog( |
| 34 gfx::NativeWindow parent_window, TabContents* tab_contents); |
| 35 |
| 36 // Call BrowserWindow::ShowRepostFormWarningDialog() to use. |
| 37 RepostFormWarningUI(gfx::NativeWindow parent_window, |
| 38 TabContents* tab_contents); |
| 39 |
| 40 virtual ~RepostFormWarningUI(); |
| 41 |
| 42 scoped_ptr<RepostFormWarningController> controller_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningUI); |
| 45 }; |
| 46 |
| 47 #endif // CHROME_BROWSER_UI_WEBUI_REPOST_FORM_WARNING_UI_H_ |
OLD | NEW |