Index: chrome/browser/android/webapps/add_to_homescreen_manager.cc |
diff --git a/chrome/browser/android/webapps/add_to_homescreen_manager.cc b/chrome/browser/android/webapps/add_to_homescreen_manager.cc |
index 2b972540eb30ee6467c29f8dd6860bf58553c9e7..b74906205386ccadc786095ea20fcd3c3b89def0 100644 |
--- a/chrome/browser/android/webapps/add_to_homescreen_manager.cc |
+++ b/chrome/browser/android/webapps/add_to_homescreen_manager.cc |
@@ -17,9 +17,12 @@ |
#include "chrome/browser/android/webapk/webapk_metrics.h" |
#include "chrome/browser/banners/app_banner_settings_helper.h" |
#include "content/public/browser/browser_thread.h" |
+#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/common/origin_util.h" |
#include "jni/AddToHomescreenManager_jni.h" |
+#include "mojo/public/cpp/bindings/interface_request.h" |
+#include "services/shell/public/cpp/interface_provider.h" |
#include "ui/gfx/android/java_bitmap.h" |
using base::android::JavaParamRef; |
@@ -115,6 +118,14 @@ void AddToHomescreenManager::AddShortcut(const ShortcutInfo& info, |
ShortcutHelper::AddToLauncherWithSkBitmap( |
web_contents->GetBrowserContext(), info, uid, icon, |
data_fetcher_->FetchSplashScreenImageCallback(uid)); |
+ |
dominickn
2016/10/12 22:35:09
This doesn't account for WebAPKs, which call Short
Matt Giuca
2016/12/09 04:36:48
As with Desktop, let's leave WebAPKs for another C
|
+ // Fire the appinstalled event. |
+ if (!installation_service_) { |
+ web_contents->GetMainFrame()->GetRemoteInterfaces()->GetInterface( |
+ mojo::GetProxy(&installation_service_)); |
+ DCHECK(installation_service_); |
+ } |
+ installation_service_->OnInstall(); |
} |
void AddToHomescreenManager::RecordAddToHomescreen() { |