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

Unified Diff: trunk/src/chrome/browser/ui/gtk/infobars/infobar_gtk.h

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/ui/gtk/infobars/infobar_gtk.h
===================================================================
--- trunk/src/chrome/browser/ui/gtk/infobars/infobar_gtk.h (revision 238401)
+++ trunk/src/chrome/browser/ui/gtk/infobars/infobar_gtk.h (working copy)
@@ -33,9 +33,21 @@
typedef void (InfoBarGtk::*ColorGetter)(InfoBarDelegate::Type,
double* r, double* g, double* b);
- explicit InfoBarGtk(scoped_ptr<InfoBarDelegate> delegate);
+ InfoBarGtk(InfoBarService* owner, InfoBarDelegate* delegate);
virtual ~InfoBarGtk();
+ // Must be called before we try to show the infobar. Inits any widgets and
+ // related objects necessary. This must be called only once during the
+ // infobar's life.
+ //
+ // NOTE: Subclasses who need to init widgets should override this function and
+ // explicitly call their parent's implementation first, then continue with
+ // further work they need to do. Failing to call the parent implementation
+ // first (or at all), or setting up widgets in the constructor instead of
+ // here, will lead to bad side effects like crashing or having this function
+ // get called repeatedly.
+ virtual void InitWidgets();
+
// Get the top level native GTK widget for this infobar.
GtkWidget* widget() { return widget_.get(); }
@@ -60,16 +72,6 @@
static const int kEndOfLabelSpacing;
// InfoBar:
-
- // Inits any widgets and related objects necessary.
- //
- // NOTE: Subclasses who need to init widgets should override this function and
- // explicitly call their parent's implementation first, then continue with
- // further work they need to do. Failing to call the parent implementation
- // first (or at all), or setting up widgets in the constructor instead of
- // here, will lead to bad side effects like crashing.
- virtual void PlatformSpecificSetOwner() OVERRIDE;
-
virtual void PlatformSpecificShow(bool animate) OVERRIDE;
virtual void PlatformSpecificOnCloseSoon() OVERRIDE;
virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698