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

Unified Diff: chrome/browser/ui/views/infobars/confirm_infobar.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/views/infobars/confirm_infobar.cc
===================================================================
--- chrome/browser/ui/views/infobars/confirm_infobar.cc (revision 238220)
+++ chrome/browser/ui/views/infobars/confirm_infobar.cc (working copy)
@@ -14,16 +14,17 @@
// ConfirmInfoBarDelegate -----------------------------------------------------
-InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
- return new ConfirmInfoBar(owner, this);
+// static
+scoped_ptr<InfoBar> ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate> delegate) {
+ return scoped_ptr<InfoBar>(new ConfirmInfoBar(delegate.Pass()));
}
// ConfirmInfoBar -------------------------------------------------------------
-ConfirmInfoBar::ConfirmInfoBar(InfoBarService* owner,
- ConfirmInfoBarDelegate* delegate)
- : InfoBarView(owner, delegate),
+ConfirmInfoBar::ConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate> delegate)
+ : InfoBarView(delegate.PassAs<InfoBarDelegate>()),
label_(NULL),
ok_button_(NULL),
cancel_button_(NULL),
« no previous file with comments | « chrome/browser/ui/views/infobars/confirm_infobar.h ('k') | chrome/browser/ui/views/infobars/extension_infobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698