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

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

Issue 12276010: Factor out uses of the WebContentsModalDialog interface from platform-independent code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove incorrect override Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TAB_MODAL_CONFIRM_DIALOG_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_TAB_MODAL_CONFIRM_DIALOG_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_TAB_MODAL_CONFIRM_DIALOG_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_TAB_MODAL_CONFIRM_DIALOG_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" 12 #include "chrome/browser/ui/tab_modal_confirm_dialog.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 ConstrainedWindowGtk;
16 class TabModalConfirmDialogDelegate; 17 class TabModalConfirmDialogDelegate;
17 18
18 namespace content { 19 namespace content {
19 class WebContents; 20 class WebContents;
20 } 21 }
21 22
22 // Displays a tab-modal dialog, i.e. a dialog that will block the current page 23 // Displays a tab-modal dialog, i.e. a dialog that will block the current page
23 // but still allow the user to switch to a different page. 24 // but still allow the user to switch to a different page.
24 // To display the dialog, allocate this object on the heap. It will open the 25 // To display the dialog, allocate this object on the heap. It will open the
25 // dialog from its constructor and then delete itself when the user dismisses 26 // dialog from its constructor and then delete itself when the user dismisses
(...skipping 11 matching lines...) Expand all
37 38
38 private: 39 private:
39 friend class TabModalConfirmDialogTest; 40 friend class TabModalConfirmDialogTest;
40 41
41 virtual ~TabModalConfirmDialogGtk(); 42 virtual ~TabModalConfirmDialogGtk();
42 43
43 // TabModalConfirmDialog: 44 // TabModalConfirmDialog:
44 virtual void AcceptTabModalDialog() OVERRIDE; 45 virtual void AcceptTabModalDialog() OVERRIDE;
45 virtual void CancelTabModalDialog() OVERRIDE; 46 virtual void CancelTabModalDialog() OVERRIDE;
46 47
48 // TabModalConfirmDialogCloseDelegate:
49 virtual void CloseDialog() OVERRIDE;
50
47 // Callbacks: 51 // Callbacks:
48 CHROMEGTK_CALLBACK_0(TabModalConfirmDialogGtk, void, OnAccept); 52 CHROMEGTK_CALLBACK_0(TabModalConfirmDialogGtk, void, OnAccept);
49 CHROMEGTK_CALLBACK_0(TabModalConfirmDialogGtk, void, OnCancel); 53 CHROMEGTK_CALLBACK_0(TabModalConfirmDialogGtk, void, OnCancel);
50 54
51 scoped_ptr<TabModalConfirmDialogDelegate> delegate_; 55 scoped_ptr<TabModalConfirmDialogDelegate> delegate_;
52 56
53 GtkWidget* dialog_; 57 GtkWidget* dialog_;
54 GtkWidget* ok_; 58 GtkWidget* ok_;
55 GtkWidget* cancel_; 59 GtkWidget* cancel_;
56 60
61 ConstrainedWindowGtk* window_;
62
57 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogGtk); 63 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogGtk);
58 }; 64 };
59 65
60 #endif // CHROME_BROWSER_UI_GTK_TAB_MODAL_CONFIRM_DIALOG_GTK_H_ 66 #endif // CHROME_BROWSER_UI_GTK_TAB_MODAL_CONFIRM_DIALOG_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/login_prompt_gtk.cc ('k') | chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698