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

Side by Side Diff: chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h

Issue 6598057: Split infobar_delegate.[cc,h] into separate pieces for the different classes defined within, so that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 9 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 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_INFOBARS_CONFIRM_INFOBAR_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_CONFIRM_INFOBAR_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_CONFIRM_INFOBAR_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_CONFIRM_INFOBAR_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
Peter Kasting 2011/03/01 19:10:37 Nit: Forward declare instead of adding this
tfarina 2011/03/02 01:47:13 I can't because of line 28.
10 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" 11 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
11 #include "ui/base/gtk/gtk_signal.h" 12 #include "ui/base/gtk/gtk_signal.h"
12 13
13 typedef struct _GtkWidget GtkWidget; 14 typedef struct _GtkWidget GtkWidget;
14 15
15 // An infobar that shows a message, up to two optional buttons, and an optional, 16 // An infobar that shows a message, up to two optional buttons, and an optional,
16 // right-aligned link. This is commonly used to do things like: 17 // right-aligned link. This is commonly used to do things like:
17 // "Would you like to do X? [Yes] [No] _Learn More_ [x]" 18 // "Would you like to do X? [Yes] [No] _Learn More_ [x]"
18 class ConfirmInfoBarGtk : public InfoBar { 19 class ConfirmInfoBarGtk : public InfoBar {
19 public: 20 public:
20 explicit ConfirmInfoBarGtk(ConfirmInfoBarDelegate* delegate); 21 explicit ConfirmInfoBarGtk(ConfirmInfoBarDelegate* delegate);
21 22
22 private: 23 private:
23 virtual ~ConfirmInfoBarGtk(); 24 virtual ~ConfirmInfoBarGtk();
24 25
25 // Adds a button to the info bar by type. It will do nothing if the delegate 26 // Adds a button to the info bar by type. It will do nothing if the delegate
26 // doesn't specify a button of the given type. 27 // doesn't specify a button of the given type.
27 void AddButton(ConfirmInfoBarDelegate::InfoBarButton type); 28 void AddButton(ConfirmInfoBarDelegate::InfoBarButton type);
28 29
29 CHROMEGTK_CALLBACK_0(ConfirmInfoBarGtk, void, OnOkButton); 30 CHROMEGTK_CALLBACK_0(ConfirmInfoBarGtk, void, OnOkButton);
30 CHROMEGTK_CALLBACK_0(ConfirmInfoBarGtk, void, OnCancelButton); 31 CHROMEGTK_CALLBACK_0(ConfirmInfoBarGtk, void, OnCancelButton);
31 CHROMEGTK_CALLBACK_0(ConfirmInfoBarGtk, void, OnLinkClicked); 32 CHROMEGTK_CALLBACK_0(ConfirmInfoBarGtk, void, OnLinkClicked);
32 33
33 GtkWidget* confirm_hbox_; 34 GtkWidget* confirm_hbox_;
34 35
35 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBarGtk); 36 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBarGtk);
36 }; 37 };
37 38
38 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_CONFIRM_INFOBAR_GTK_H_ 39 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_CONFIRM_INFOBAR_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698