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

Unified Diff: chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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: chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc (revision 238220)
+++ chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc (working copy)
@@ -16,16 +16,18 @@
// ConfirmInfoBarDelegate ------------------------------------------------------
-InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
- return new ConfirmInfoBarGtk(owner, this);
+// static
+scoped_ptr<InfoBar> ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate> delegate) {
+ return scoped_ptr<InfoBar>(new ConfirmInfoBarGtk(delegate.Pass()));
}
// ConfirmInfoBarGtk -----------------------------------------------------------
-ConfirmInfoBarGtk::ConfirmInfoBarGtk(InfoBarService* owner,
- ConfirmInfoBarDelegate* delegate)
- : InfoBarGtk(owner, delegate),
+ConfirmInfoBarGtk::ConfirmInfoBarGtk(
+ scoped_ptr<ConfirmInfoBarDelegate> delegate)
+ : InfoBarGtk(delegate.PassAs<InfoBarDelegate>()),
confirm_hbox_(NULL),
size_group_(NULL) {
}
@@ -35,8 +37,8 @@
g_object_unref(size_group_);
}
-void ConfirmInfoBarGtk::InitWidgets() {
- InfoBarGtk::InitWidgets();
+void ConfirmInfoBarGtk::PlatformSpecificSetOwner() {
+ InfoBarGtk::PlatformSpecificSetOwner();
confirm_hbox_ = gtk_chrome_shrinkable_hbox_new(FALSE, FALSE,
kEndOfLabelSpacing);
« no previous file with comments | « chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h ('k') | chrome/browser/ui/gtk/infobars/extension_infobar_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698