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

Unified Diff: third_party/WebKit/Source/web/WebScopedUserGesture.cpp

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: Re-add dropped null check 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: third_party/WebKit/Source/web/WebScopedUserGesture.cpp
diff --git a/third_party/WebKit/Source/web/WebScopedUserGesture.cpp b/third_party/WebKit/Source/web/WebScopedUserGesture.cpp
index ea902b6c8ead0a5a98d96429b87ac19849c6f846..4b48117a614e1b6e1480bb725d2c4b94f1c69905 100644
--- a/third_party/WebKit/Source/web/WebScopedUserGesture.cpp
+++ b/third_party/WebKit/Source/web/WebScopedUserGesture.cpp
@@ -30,8 +30,10 @@
#include "public/web/WebScopedUserGesture.h"
+#include "core/dom/DocumentUserGestureToken.h"
#include "platform/UserGestureIndicator.h"
#include "public/web/WebUserGestureToken.h"
+#include "web/WebLocalFrameImpl.h"
namespace blink {
@@ -40,9 +42,10 @@ WebScopedUserGesture::WebScopedUserGesture(const WebUserGestureToken& token) {
m_indicator.reset(new UserGestureIndicator(token));
}
-WebScopedUserGesture::WebScopedUserGesture() {
- m_indicator.reset(new UserGestureIndicator(
- UserGestureToken::create(UserGestureToken::NewGesture)));
+WebScopedUserGesture::WebScopedUserGesture(WebLocalFrame* frame) {
+ m_indicator.reset(new UserGestureIndicator(DocumentUserGestureToken::create(
+ frame ? toWebLocalFrameImpl(frame)->frame()->document() : nullptr,
+ UserGestureToken::NewGesture)));
}
WebScopedUserGesture::~WebScopedUserGesture() {}
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.cpp ('k') | third_party/WebKit/Source/web/WebUserGestureIndicator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698