| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_REPOST_FORM_WARNING_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_REPOST_FORM_WARNING_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_REPOST_FORM_WARNING_GTK_H_ | 6 #define CHROME_BROWSER_GTK_REPOST_FORM_WARNING_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "chrome/common/notification_registrar.h" | 10 #include "chrome/common/notification_registrar.h" |
| 11 | 11 |
| 12 class NavigationController; | 12 class NavigationController; |
| 13 | 13 |
| 14 // Displays a dialog that warns the user that they are about to resubmit a form. |
| 15 // To display the dialog, allocate this object on the heap. It will open the |
| 16 // dialog from its constructor and then delete itself when the user dismisses |
| 17 // the dialog. |
| 14 class RepostFormWarningGtk : public NotificationObserver { | 18 class RepostFormWarningGtk : public NotificationObserver { |
| 15 public: | 19 public: |
| 16 RepostFormWarningGtk(GtkWindow* parent, | 20 RepostFormWarningGtk(GtkWindow* parent, |
| 17 NavigationController* navigation_controller); | 21 NavigationController* navigation_controller); |
| 18 virtual ~RepostFormWarningGtk(); | 22 virtual ~RepostFormWarningGtk(); |
| 19 | 23 |
| 20 private: | 24 private: |
| 21 // NotificationObserver implementation. | 25 // NotificationObserver implementation. |
| 22 // Watch for a new load or a closed tab and dismiss the dialog if they occur. | 26 // Watch for a new load or a closed tab and dismiss the dialog if they occur. |
| 23 virtual void Observe(NotificationType type, | 27 virtual void Observe(NotificationType type, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 | 41 |
| 38 // Navigation controller, used to continue the reload. | 42 // Navigation controller, used to continue the reload. |
| 39 NavigationController* navigation_controller_; | 43 NavigationController* navigation_controller_; |
| 40 | 44 |
| 41 GtkWidget* dialog_; | 45 GtkWidget* dialog_; |
| 42 | 46 |
| 43 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningGtk); | 47 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningGtk); |
| 44 }; | 48 }; |
| 45 | 49 |
| 46 #endif // CHROME_BROWSER_GTK_REPOST_FORM_WARNING_GTK_H_ | 50 #endif // CHROME_BROWSER_GTK_REPOST_FORM_WARNING_GTK_H_ |
| OLD | NEW |