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

Side by Side Diff: chrome/browser/ui/gtk/tab_modal_dialog_gtk.h

Issue 8851007: WIP / Do not commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 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 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_UI_GTK_REPOST_FORM_WARNING_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_TAB_MODAL_DIALOG_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_REPOST_FORM_WARNING_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_TAB_MODAL_DIALOG_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 13 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
14 #include "ui/base/gtk/gtk_signal.h" 14 #include "ui/base/gtk/gtk_signal.h"
15 15
16 class RepostFormWarningController;
17 class TabContents; 16 class TabContents;
17 class TabModalDialogDelegate;
18 18
19 // Displays a dialog that warns the user that they are about to resubmit 19 // Displays a tab-modal dialog, i.e. a dialog that will block the current page
20 // a form. 20 // but still allow the user to switch to a different page.
21 // To display the dialog, allocate this object on the heap. It will open the 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 22 // dialog from its constructor and then delete itself when the user dismisses
23 // the dialog. 23 // the dialog.
24 class RepostFormWarningGtk : public ConstrainedWindowGtkDelegate { 24 class TabModalDialogGtk : public ConstrainedWindowGtkDelegate {
25 public: 25 public:
26 RepostFormWarningGtk(GtkWindow* parent, TabContents* tab_contents); 26 TabModalDialogGtk(GtkWindow* parent,
27 TabModalDialogDelegate* delegate,
28 TabContents* tab_contents);
27 29
28 // ConstrainedWindowGtkDelegate methods 30 // ConstrainedWindowGtkDelegate methods
29 virtual GtkWidget* GetWidgetRoot() OVERRIDE; 31 virtual GtkWidget* GetWidgetRoot() OVERRIDE;
30 virtual GtkWidget* GetFocusWidget() OVERRIDE; 32 virtual GtkWidget* GetFocusWidget() OVERRIDE;
31 virtual void DeleteDelegate() OVERRIDE; 33 virtual void DeleteDelegate() OVERRIDE;
32 34
33 private: 35 private:
34 virtual ~RepostFormWarningGtk(); 36 virtual ~TabModalDialogGtk();
35 37
36 // Callbacks 38 // Callbacks
37 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnRefresh); 39 CHROMEGTK_CALLBACK_0(TabModalDialogGtk, void, OnRefresh);
38 CHROMEGTK_CALLBACK_0(RepostFormWarningGtk, void, OnCancel); 40 CHROMEGTK_CALLBACK_0(TabModalDialogGtk, void, OnCancel);
39 41
40 scoped_ptr<RepostFormWarningController> controller_; 42 scoped_ptr<TabModalDialogDelegate> delegate_;
41 43
42 GtkWidget* dialog_; 44 GtkWidget* dialog_;
43 GtkWidget* ok_; 45 GtkWidget* ok_;
44 GtkWidget* cancel_; 46 GtkWidget* cancel_;
45 47
46 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningGtk); 48 DISALLOW_COPY_AND_ASSIGN(TabModalDialogGtk);
47 }; 49 };
48 50
49 #endif // CHROME_BROWSER_UI_GTK_REPOST_FORM_WARNING_GTK_H_ 51 #endif // CHROME_BROWSER_UI_GTK_TAB_MODAL_DIALOG_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/repost_form_warning_gtk.cc ('k') | chrome/browser/ui/gtk/tab_modal_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698