Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: chrome/browser/gtk/repost_form_warning_gtk.h

Issue 660434: Make repost form warning tab-modal on Gtk. (Closed)
Patch Set: Fixed a small bug when two tabmodal dialogs were shown. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/gtk/repost_form_warning_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/repost_form_warning_gtk.h
diff --git a/chrome/browser/gtk/repost_form_warning_gtk.h b/chrome/browser/gtk/repost_form_warning_gtk.h
index 268b98e3a35daddefbaf8b4c1ab157498417313a..4382fbccb9f590f78bb001b255d5a2b92b65cdaf 100644
--- a/chrome/browser/gtk/repost_form_warning_gtk.h
+++ b/chrome/browser/gtk/repost_form_warning_gtk.h
@@ -8,19 +8,26 @@
#include <gtk/gtk.h>
#include "chrome/common/notification_registrar.h"
+#include "chrome/browser/gtk/constrained_window_gtk.h"
+#include "app/gtk_signal.h"
class NavigationController;
+class TabContents;
// Displays a dialog that warns the user that they are about to resubmit a form.
// To display the dialog, allocate this object on the heap. It will open the
// dialog from its constructor and then delete itself when the user dismisses
// the dialog.
-class RepostFormWarningGtk : public NotificationObserver {
+class RepostFormWarningGtk : public NotificationObserver,
+ ConstrainedWindowGtkDelegate {
public:
- RepostFormWarningGtk(GtkWindow* parent,
- NavigationController* navigation_controller);
+ RepostFormWarningGtk(GtkWindow* parent, TabContents* tab_contents);
virtual ~RepostFormWarningGtk();
+ virtual GtkWidget* GetWidgetRoot();
+
+ virtual void DeleteDelegate();
+
private:
// NotificationObserver implementation.
// Watch for a new load or a closed tab and dismiss the dialog if they occur.
@@ -29,13 +36,15 @@ class RepostFormWarningGtk : public NotificationObserver {
const NotificationDetails& details);
// Tell Gtk to destroy the dialog window. This will only be done once, even
- // if Destroy is called multiple times (eg, from both OnResponse and Observe.)
+ // if Destroy is called multiple times.
void Destroy();
- static void OnResponse(GtkWidget* widget,
- int response,
- RepostFormWarningGtk* dialog);
- static void OnWindowDestroy(GtkWidget* widget, RepostFormWarningGtk* dialog);
+ CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnRefresh);
+ CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnCancel);
+ CHROMEGTK_CALLBACK_1(RepostFormWarningGtk,
+ void,
+ OnHierarchyChanged,
+ GtkWidget*);
NotificationRegistrar registrar_;
@@ -43,6 +52,10 @@ class RepostFormWarningGtk : public NotificationObserver {
NavigationController* navigation_controller_;
GtkWidget* dialog_;
+ GtkWidget* ok_;
+ GtkWidget* cancel_;
+
+ ConstrainedWindow* window_;
DISALLOW_COPY_AND_ASSIGN(RepostFormWarningGtk);
};
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/gtk/repost_form_warning_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698