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

Unified Diff: chrome/browser/android/banners/app_banner_infobar_delegate.cc

Issue 896243004: Start piping Android app promos through AppBannerInfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits Created 5 years, 10 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/android/banners/app_banner_infobar_delegate.cc
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate.cc b/chrome/browser/android/banners/app_banner_infobar_delegate.cc
index e35f55b42a5d4350a8159e72d780e6a8e0a4a660..0d816119071800dc548930458ff0056b94b7af51 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate.cc
@@ -15,6 +15,18 @@
namespace banners {
// static
+AppBannerInfoBar* AppBannerInfoBarDelegate::CreateForNativeApp(
+ infobars::InfoBarManager* infobar_manager,
+ AppDelegate* app_delegate,
+ const base::android::ScopedJavaGlobalRef<jobject>& japp_data) {
+ scoped_ptr<AppBannerInfoBarDelegate> delegate(new AppBannerInfoBarDelegate(
+ app_delegate));
+ AppBannerInfoBar* infobar = new AppBannerInfoBar(delegate.Pass(), japp_data);
+ return infobar_manager->AddInfoBar(make_scoped_ptr(infobar))
+ ? infobar : nullptr;
+}
+
+// static
AppBannerInfoBar* AppBannerInfoBarDelegate::CreateForWebApp(
infobars::InfoBarManager* infobar_manager,
AppDelegate* app_delegate,
« no previous file with comments | « chrome/browser/android/banners/app_banner_infobar_delegate.h ('k') | chrome/browser/android/banners/app_banner_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698