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..9bfd686bf4b09d6384ba4cdc4a9cc53fe235e0df 100644 |
--- a/chrome/browser/android/shortcut_helper.cc |
+++ b/chrome/browser/android/shortcut_helper.cc |
@@ -15,7 +15,6 @@ |
#include "base/strings/string16.h" |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/android/webapk/chrome_webapk_host.h" |
-#include "chrome/browser/android/webapk/webapk_installer.h" |
dominickn
2016/08/25 04:25:56
Don't you still need this header since you're inst
Xi Han
2016/08/26 17:04:17
You are right, add it back.
|
#include "chrome/browser/manifest/manifest_icon_downloader.h" |
#include "chrome/common/chrome_switches.h" |
#include "content/public/browser/browser_thread.h" |
@@ -73,10 +72,6 @@ void ShortcutHelper::AddToLauncherWithSkBitmap( |
const base::Closure& splash_image_callback) { |
if (info.display == blink::WebDisplayModeStandalone || |
info.display == blink::WebDisplayModeFullscreen) { |
- if (ChromeWebApkHost::AreWebApkEnabled()) { |
pkotwicz
2016/08/25 22:23:15
It is worth mentioning in the CL description that
Xi Han
2016/08/26 17:04:17
Done.
|
- InstallWebApkWithSkBitmap(browser_context, info, icon_bitmap); |
- return; |
- } |
AddWebappWithSkBitmap(info, webapp_id, icon_bitmap, splash_image_callback); |
return; |
} |
@@ -87,11 +82,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 +145,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(); |