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

Unified Diff: chrome/browser/android/shortcut_helper.cc

Issue 2259553002: Make AppBannerInfoBar install WebAPK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
« no previous file with comments | « chrome/browser/android/shortcut_helper.h ('k') | chrome/browser/android/webapk/webapk_installer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/shortcut_helper.cc
diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc
index 6c4469059144a971b1d7208b19ad9f9f71e9adcb..e1e00710a58ed2af243150e80c1d0daaf29cb09e 100644
--- a/chrome/browser/android/shortcut_helper.cc
+++ b/chrome/browser/android/shortcut_helper.cc
@@ -73,10 +73,6 @@ void ShortcutHelper::AddToLauncherWithSkBitmap(
const base::Closure& splash_image_callback) {
if (info.display == blink::WebDisplayModeStandalone ||
info.display == blink::WebDisplayModeFullscreen) {
- if (ChromeWebApkHost::AreWebApkEnabled()) {
- InstallWebApkWithSkBitmap(browser_context, info, icon_bitmap);
- return;
- }
AddWebappWithSkBitmap(info, webapp_id, icon_bitmap, splash_image_callback);
return;
}
@@ -87,11 +83,11 @@ void ShortcutHelper::AddToLauncherWithSkBitmap(
void ShortcutHelper::InstallWebApkWithSkBitmap(
content::BrowserContext* browser_context,
const ShortcutInfo& info,
- const SkBitmap& icon_bitmap) {
+ const SkBitmap& icon_bitmap,
+ const WebApkInstaller::FinishCallback& callback) {
// WebApkInstaller destroys itself when it is done.
WebApkInstaller* installer = new WebApkInstaller(info, icon_bitmap);
- installer->InstallAsync(browser_context,
- base::Bind(&ShortcutHelper::OnBuiltWebApk));
+ installer->InstallAsync(browser_context, callback);
}
// static
@@ -150,16 +146,6 @@ void ShortcutHelper::AddShortcutWithSkBitmap(
info.source);
}
-void ShortcutHelper::OnBuiltWebApk(bool success) {
- if (success) {
- DVLOG(1) << "Sent request to install WebAPK. Seems to have worked.";
- } else {
- LOG(ERROR) << "WebAPK install failed.";
- }
- // TODO(pkotwicz): Figure out what to do when installing WebAPK fails.
- // (crbug.com/626950)
-}
-
int ShortcutHelper::GetIdealHomescreenIconSizeInDp() {
if (kIdealHomescreenIconSize == -1)
GetHomescreenIconAndSplashImageSizes();
« no previous file with comments | « chrome/browser/android/shortcut_helper.h ('k') | chrome/browser/android/webapk/webapk_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698