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

Unified Diff: third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp

Issue 2910363002: Propagate a user gesture bit for beforeinstallprompt.prompt() (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp
diff --git a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp
index 096767aa483bbcc827a3c9795c2b2533e6a2b419..47d459e702891eab80438bad00dce023fbffae40 100644
--- a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp
+++ b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp
@@ -8,6 +8,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
+#include "core/dom/UserGestureIndicator.h"
#include "core/frame/UseCounter.h"
#include "modules/app_banner/BeforeInstallPromptEventInit.h"
@@ -79,7 +80,8 @@ ScriptPromise BeforeInstallPromptEvent::prompt(ScriptState* script_state) {
UseCounter::kBeforeInstallPromptEventPrompt);
prompt_called_ = true;
- banner_service_->DisplayAppBanner();
+ banner_service_->DisplayAppBanner(
+ UserGestureIndicator::ProcessingUserGesture());
return ScriptPromise::CastUndefined(script_state);
}

Powered by Google App Engine
This is Rietveld 408576698