Chromium Code Reviews| 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 40af6b5d348307d46c2cc2d30bb45d86549d2239..05dd1d303dfee4f8ec99f35dc9698c730d855498 100644 |
| --- a/chrome/browser/android/webapps/add_to_homescreen_manager.cc |
| +++ b/chrome/browser/android/webapps/add_to_homescreen_manager.cc |
| @@ -17,9 +17,11 @@ |
| #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" |
|
dominickn
2016/12/15 03:45:59
#include "mojo/public/cpp/bindings/interface_reque
Matt Giuca
2016/12/15 06:17:23
Done.
|
| +#include "services/service_manager/public/cpp/interface_provider.h" |
| #include "ui/gfx/android/java_bitmap.h" |
| using base::android::JavaParamRef; |
| @@ -115,6 +117,13 @@ void AddToHomescreenManager::AddShortcut(const ShortcutInfo& info, |
| ShortcutHelper::AddToLauncherWithSkBitmap( |
| web_contents->GetBrowserContext(), info, uid, icon, |
| data_fetcher_->FetchSplashScreenImageCallback(uid)); |
| + |
| + // Fire the appinstalled event. |
| + blink::mojom::InstallationServicePtr installation_service; |
| + web_contents->GetMainFrame()->GetRemoteInterfaces()->GetInterface( |
| + mojo::GetProxy(&installation_service)); |
| + DCHECK(installation_service); |
| + installation_service->OnInstall(); |
| } |
| void AddToHomescreenManager::RecordAddToHomescreen() { |