| 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_GTK_REPOST_FORM_WARNING_GTK_H_ | |
| 6 #define CHROME_BROWSER_UI_GTK_REPOST_FORM_WARNING_GTK_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <gtk/gtk.h> | |
| 10 | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" | |
| 14 #include "ui/base/gtk/gtk_signal.h" | |
| 15 | |
| 16 class RepostFormWarningController; | |
| 17 class TabContents; | |
| 18 | |
| 19 // Displays a dialog that warns the user that they are about to resubmit | |
| 20 // a form. | |
| 21 // To display the dialog, allocate this object on the heap. It will open the | |
| 22 // dialog from its constructor and then delete itself when the user dismisses | |
| 23 // the dialog. | |
| 24 class RepostFormWarningGtk : public ConstrainedWindowGtkDelegate { | |
| 25 public: | |
| 26 RepostFormWarningGtk(GtkWindow* parent, TabContents* tab_contents); | |
| 27 | |
| 28 // ConstrainedWindowGtkDelegate methods | |
| 29 virtual GtkWidget* GetWidgetRoot() OVERRIDE; | |
| 30 virtual GtkWidget* GetFocusWidget() OVERRIDE; | |
| 31 virtual void DeleteDelegate() OVERRIDE; | |
| 32 | |
| 33 private: | |
| 34 virtual ~RepostFormWarningGtk(); | |
| 35 | |
| 36 // Callbacks | |
| 37 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnRefresh); | |
| 38 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnCancel); | |
| 39 | |
| 40 scoped_ptr<RepostFormWarningController> controller_; | |
| 41 | |
| 42 GtkWidget* dialog_; | |
| 43 GtkWidget* ok_; | |
| 44 GtkWidget* cancel_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningGtk); | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_UI_GTK_REPOST_FORM_WARNING_GTK_H_ | |
| OLD | NEW |