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

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

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)
Patch Set: Minor refactor. Created 4 years, 2 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
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 a46c9dd012bfe2d0e632f0e29f8051c6811b7250..b7aefcffad05424149e1b9c498428c031181a3ff 100644
--- a/chrome/browser/banners/app_banner_manager.cc
+++ b/chrome/browser/banners/app_banner_manager.cc
@@ -23,6 +23,8 @@
#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/shell/public/cpp/interface_provider.h"
#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerPromptReply.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/display/display.h"
@@ -134,6 +136,15 @@ void AppBannerManager::RequestAppBanner(const GURL& validated_url,
base::Bind(&AppBannerManager::OnDidGetManifest, GetWeakPtr()));
}
+void AppBannerManager::OnInstall() {
+ if (!installation_service_) {
+ web_contents()->GetMainFrame()->GetRemoteInterfaces()->GetInterface(
+ mojo::GetProxy(&installation_service_));
+ DCHECK(installation_service_);
+ }
+ installation_service_->OnInstall();
+}
+
base::Closure AppBannerManager::FetchWebappSplashScreenImageCallback(
const std::string& webapp_id) {
return base::Closure();

Powered by Google App Engine
This is Rietveld 408576698