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

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

Issue 1161233005: Implement app banner info bars on desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stop-icon-overgeneration
Patch Set: Moving feature enabling to existing #ifs Created 5 years, 7 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_data_fetcher_android.cc
diff --git a/chrome/browser/android/banners/app_banner_data_fetcher_android.cc b/chrome/browser/android/banners/app_banner_data_fetcher_android.cc
index 29934f4639ed049f4990b7adc31df8e8b992cf03..eaba3f14a8bfb05da7108d7d9ff12c542504b59a 100644
--- a/chrome/browser/android/banners/app_banner_data_fetcher_android.cc
+++ b/chrome/browser/android/banners/app_banner_data_fetcher_android.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/android/banners/app_banner_data_fetcher_android.h"
#include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h"
+#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/ui/android/infobars/app_banner_infobar_android.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -41,9 +42,8 @@ std::string AppBannerDataFetcherAndroid::GetAppIdentifier() {
? AppBannerDataFetcher::GetAppIdentifier() : native_app_package_;
}
-infobars::InfoBar* AppBannerDataFetcherAndroid::CreateBanner(
- const SkBitmap* icon,
- const base::string16& title) {
+void AppBannerDataFetcherAndroid::ShowBanner(const SkBitmap* icon,
+ const base::string16& title) {
content::WebContents* web_contents = GetWebContents();
DCHECK(web_contents);
@@ -66,8 +66,8 @@ infobars::InfoBar* AppBannerDataFetcherAndroid::CreateBanner(
if (infobar)
RecordDidShowBanner("AppBanner.NativeApp.Shown");
}
-
- return infobar;
+ InfoBarService::FromWebContents(web_contents)
+ ->AddInfoBar(make_scoped_ptr(infobar));
}
} // namespace banners

Powered by Google App Engine
This is Rietveld 408576698