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

Unified Diff: chrome/browser/ui/android/infobars/translate_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/android/infobars/translate_infobar.cc
===================================================================
--- chrome/browser/ui/android/infobars/translate_infobar.cc (revision 238220)
+++ chrome/browser/ui/android/infobars/translate_infobar.cc (working copy)
@@ -16,16 +16,17 @@
// TranslateInfoBarDelegate ---------------------------------------------------
// static
-InfoBar* TranslateInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
- return new TranslateInfoBar(owner, this);
+scoped_ptr<InfoBar> TranslateInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<TranslateInfoBarDelegate> delegate) {
+ return scoped_ptr<InfoBar>(new TranslateInfoBar(delegate.Pass()));
}
// TranslateInfoBar -----------------------------------------------------------
-TranslateInfoBar::TranslateInfoBar(InfoBarService* owner,
- TranslateInfoBarDelegate* delegate)
- : InfoBarAndroid(owner, delegate),
+TranslateInfoBar::TranslateInfoBar(
+ scoped_ptr<TranslateInfoBarDelegate> delegate)
+ : InfoBarAndroid(delegate.PassAs<InfoBarDelegate>()),
java_translate_delegate_() {
}
« no previous file with comments | « chrome/browser/ui/android/infobars/translate_infobar.h ('k') | chrome/browser/ui/apps/app_metro_infobar_delegate_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698