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

Unified Diff: third_party/WebKit/Source/web/SuspendableScriptExecutor.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/SuspendableScriptExecutor.cpp
diff --git a/third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp b/third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp
index f6a706512ebdb31404960fae42edd96861973c21..20aba329814e771e03d166318aecd919a4079194 100644
--- a/third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp
+++ b/third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp
@@ -8,6 +8,7 @@
#include "bindings/core/v8/ScriptSourceCode.h"
#include "bindings/core/v8/V8PersistentValueVector.h"
#include "core/dom/Document.h"
+#include "core/dom/DocumentUserGestureToken.h"
#include "core/frame/LocalFrame.h"
#include "platform/UserGestureIndicator.h"
#include "public/platform/WebVector.h"
@@ -54,8 +55,9 @@ WebScriptExecutor::WebScriptExecutor(
Vector<v8::Local<v8::Value>> WebScriptExecutor::execute(LocalFrame* frame) {
std::unique_ptr<UserGestureIndicator> indicator;
if (m_userGesture) {
- indicator = wrapUnique(new UserGestureIndicator(
- UserGestureToken::create(UserGestureToken::NewGesture)));
+ indicator =
+ wrapUnique(new UserGestureIndicator(DocumentUserGestureToken::create(
+ frame->document(), UserGestureToken::NewGesture)));
}
Vector<v8::Local<v8::Value>> results;
« no previous file with comments | « third_party/WebKit/Source/platform/UserGestureIndicatorTest.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698