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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/PushManager.cpp

Issue 2935333003: Propagate the user gesture bit when requesting push messaging permission. (Closed)
Patch Set: ThreadSafe user gesture check Created 3 years, 6 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/push_messaging/PushManager.cpp
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
index e31408b12cec4b7fc803dbe02904012e25fcb03f..bc24324dc7d293c523c3ee4a49bd865e141b3564 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
@@ -10,6 +10,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
+#include "core/dom/UserGestureIndicator.h"
#include "modules/push_messaging/PushController.h"
#include "modules/push_messaging/PushError.h"
#include "modules/push_messaging/PushPermissionStatusCallbacks.h"
@@ -76,11 +77,13 @@ ScriptPromise PushManager::subscribe(ScriptState* script_state,
"Document is detached from window."));
PushController::ClientFrom(document->GetFrame())
.Subscribe(registration_->WebRegistration(), web_options,
+ UserGestureIndicator::ProcessingUserGestureThreadSafe(),
WTF::MakeUnique<PushSubscriptionCallbacks>(resolver,
registration_));
} else {
PushProvider()->Subscribe(
registration_->WebRegistration(), web_options,
+ UserGestureIndicator::ProcessingUserGestureThreadSafe(),
WTF::MakeUnique<PushSubscriptionCallbacks>(resolver, registration_));
}

Powered by Google App Engine
This is Rietveld 408576698