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

Side by Side Diff: chrome/browser/gtk/repost_form_warning_gtk.h

Issue 1657005: Merge 44481 - Ensure proper teardown of repost form warning objects.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
Patch Set: Created 10 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/gtk_signal.h" 10 #include "app/gtk_signal.h"
11 #include "base/scoped_ptr.h"
11 #include "chrome/browser/gtk/constrained_window_gtk.h" 12 #include "chrome/browser/gtk/constrained_window_gtk.h"
12 13
13 class RepostFormWarningController; 14 class RepostFormWarningController;
14 15
15 // Displays a dialog that warns the user that they are about to resubmit 16 // Displays a dialog that warns the user that they are about to resubmit
16 // a form. 17 // a form.
17 // To display the dialog, allocate this object on the heap. It will open the 18 // To display the dialog, allocate this object on the heap. It will open the
18 // dialog from its constructor and then delete itself when the user dismisses 19 // dialog from its constructor and then delete itself when the user dismisses
19 // the dialog. 20 // the dialog.
20 class RepostFormWarningGtk : public ConstrainedDialogDelegate { 21 class RepostFormWarningGtk : public ConstrainedDialogDelegate {
21 public: 22 public:
22 RepostFormWarningGtk(GtkWindow* parent, TabContents* tab_contents); 23 RepostFormWarningGtk(GtkWindow* parent, TabContents* tab_contents);
23 24
24 // ConstrainedDialogDelegate methods 25 // ConstrainedDialogDelegate methods
25 virtual GtkWidget* GetWidgetRoot(); 26 virtual GtkWidget* GetWidgetRoot();
26 27
27 virtual void DeleteDelegate(); 28 virtual void DeleteDelegate();
28 29
29 private: 30 private:
30 virtual ~RepostFormWarningGtk(); 31 virtual ~RepostFormWarningGtk();
31 32
32 void Dismiss();
33
34 // Callbacks 33 // Callbacks
35 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnRefresh); 34 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnRefresh);
36 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnCancel); 35 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnCancel);
37 CHROMEGTK_CALLBACK_1(RepostFormWarningGtk, 36 CHROMEGTK_CALLBACK_1(RepostFormWarningGtk,
38 void, 37 void,
39 OnHierarchyChanged, 38 OnHierarchyChanged,
40 GtkWidget*); 39 GtkWidget*);
41 40
42 RepostFormWarningController* controller_; 41 scoped_ptr<RepostFormWarningController> controller_;
43 42
44 GtkWidget* dialog_; 43 GtkWidget* dialog_;
45 GtkWidget* ok_; 44 GtkWidget* ok_;
46 GtkWidget* cancel_; 45 GtkWidget* cancel_;
47 46
48 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningGtk); 47 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningGtk);
49 }; 48 };
50 49
51 #endif // CHROME_BROWSER_GTK_REPOST_FORM_WARNING_GTK_H_ 50 #endif // CHROME_BROWSER_GTK_REPOST_FORM_WARNING_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/repost_form_warning_mac.mm ('k') | chrome/browser/gtk/repost_form_warning_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698