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

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

Issue 14327008: Add InitWidgets() phase for GTK infobars. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/infobars/infobar_gtk.h
===================================================================
--- chrome/browser/ui/gtk/infobars/infobar_gtk.h (revision 194662)
+++ chrome/browser/ui/gtk/infobars/infobar_gtk.h (working copy)
@@ -32,6 +32,18 @@
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();
« no previous file with comments | « chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc ('k') | chrome/browser/ui/gtk/infobars/infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698