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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 942913002: [AppBanner] Blink implementation of an event when an install banner is shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index f48c85566e5f6a66c23438876de38b3076970bd2..aecb4234c4e47dca63d7c06c73f7fd23e0b7263d 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -149,6 +149,7 @@
#include "core/rendering/RenderView.h"
#include "core/timing/DOMWindowPerformance.h"
#include "core/timing/Performance.h"
+#include "modules/app_banner/AppBannerController.h"
#include "modules/geolocation/GeolocationController.h"
#include "modules/notifications/NotificationPermissionClient.h"
#include "modules/presentation/PresentationController.h"
@@ -1943,6 +1944,14 @@ v8::Handle<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValueForTests(con
return executeScriptAndReturnValue(source);
}
+void WebLocalFrameImpl::willShowInstallBannerPrompt(const WebString& platform, bool* cancel)
+{
+ if (!RuntimeEnabledFeatures::appBannerEnabled() || !frame())
+ return;
+
+ AppBannerController::willShowInstallBannerPrompt(frame(), platform, cancel);
+}
+
void WebLocalFrameImpl::willDetachParent()
{
// Do not expect string scoping results from any frames that got detached

Powered by Google App Engine
This is Rietveld 408576698