OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_REPOST_FORM_WARNING_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_ |
7 | 7 |
8 #include "app/gfx/native_widget_types.h" | 8 #include "app/gfx/native_widget_types.h" |
9 #include "chrome/common/notification_registrar.h" | 9 #include "chrome/common/notification_registrar.h" |
10 #include "views/window/dialog_delegate.h" | 10 #include "views/window/dialog_delegate.h" |
11 | 11 |
12 class MessageBoxView; | 12 class MessageBoxView; |
13 class NavigationController; | 13 class NavigationController; |
14 namespace views { | 14 namespace views { |
15 class Window; | 15 class Window; |
16 } | 16 } |
17 | 17 |
| 18 // Displays a dialog that warns the user that they are about to resubmit a form. |
| 19 // To display the dialog, allocate this object on the heap. It will open the |
| 20 // dialog from its constructor and then delete itself when the user dismisses |
| 21 // the dialog. |
18 class RepostFormWarningView : public views::DialogDelegate, | 22 class RepostFormWarningView : public views::DialogDelegate, |
19 public NotificationObserver { | 23 public NotificationObserver { |
20 public: | 24 public: |
21 // Use BrowserWindow::ShowRepostFormWarningDialog to use. | 25 // Use BrowserWindow::ShowRepostFormWarningDialog to use. |
22 RepostFormWarningView(gfx::NativeWindow parent_window, | 26 RepostFormWarningView(gfx::NativeWindow parent_window, |
23 NavigationController* navigation_controller); | 27 NavigationController* navigation_controller); |
24 virtual ~RepostFormWarningView(); | 28 virtual ~RepostFormWarningView(); |
25 | 29 |
26 // views::DialogDelegate Methods: | 30 // views::DialogDelegate Methods: |
27 virtual std::wstring GetWindowTitle() const; | 31 virtual std::wstring GetWindowTitle() const; |
(...skipping 20 matching lines...) Expand all Loading... |
48 // The message box view whose commands we handle. | 52 // The message box view whose commands we handle. |
49 MessageBoxView* message_box_view_; | 53 MessageBoxView* message_box_view_; |
50 | 54 |
51 // Navigation controller, used to continue the reload. | 55 // Navigation controller, used to continue the reload. |
52 NavigationController* navigation_controller_; | 56 NavigationController* navigation_controller_; |
53 | 57 |
54 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningView); | 58 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningView); |
55 }; | 59 }; |
56 | 60 |
57 #endif // CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_ | 61 #endif // CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_ |
OLD | NEW |