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

Unified Diff: chrome/browser/banners/app_banner_manager.cc

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)
Patch Set: Rebase. Created 4 years 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/banners/app_banner_manager.h ('k') | chrome/test/data/banners/appinstalled_test_page.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_manager.cc
diff --git a/chrome/browser/banners/app_banner_manager.cc b/chrome/browser/banners/app_banner_manager.cc
index d9f4521a90fe18e816f9707c282c539715f49e64..2038125b69daf702be777f9f65cf2c6e1a7a9fb0 100644
--- a/chrome/browser/banners/app_banner_manager.cc
+++ b/chrome/browser/banners/app_banner_manager.cc
@@ -23,7 +23,9 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/origin_util.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
#include "services/service_manager/public/cpp/interface_provider.h"
+#include "third_party/WebKit/public/platform/modules/installation/installation.mojom.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
@@ -130,6 +132,14 @@ void AppBannerManager::RequestAppBanner(const GURL& validated_url,
base::Bind(&AppBannerManager::OnDidGetManifest, GetWeakPtr()));
}
+void AppBannerManager::OnInstall() {
+ blink::mojom::InstallationServicePtr installation_service;
+ web_contents()->GetMainFrame()->GetRemoteInterfaces()->GetInterface(
+ mojo::GetProxy(&installation_service));
+ DCHECK(installation_service);
+ installation_service->OnInstall();
+}
+
void AppBannerManager::SendBannerAccepted(int request_id) {
if (request_id != gCurrentRequestID)
return;
« no previous file with comments | « chrome/browser/banners/app_banner_manager.h ('k') | chrome/test/data/banners/appinstalled_test_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698