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

Unified Diff: third_party/WebKit/Source/core/inspector/DevToolsHost.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/core/inspector/DevToolsHost.cpp
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
index c4a73f06836672638b2a4198786a1c5ce55b40ce..8d943748d666014081849c1f226036baee812d39 100644
--- a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
+++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
@@ -32,6 +32,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/V8ScriptRunner.h"
#include "core/clipboard/Pasteboard.h"
+#include "core/dom/DocumentUserGestureToken.h"
#include "core/dom/ExecutionContext.h"
#include "core/events/Event.h"
#include "core/events/EventTarget.h"
@@ -132,7 +133,8 @@ void DevToolsHost::evaluateScript(const String& expression) {
if (!scriptState)
return;
ScriptState::Scope scope(scriptState);
- UserGestureIndicator gestureIndicator(UserGestureToken::create());
+ UserGestureIndicator gestureIndicator(
+ DocumentUserGestureToken::create(m_frontendFrame->document()));
v8::MicrotasksScope microtasks(scriptState->isolate(),
v8::MicrotasksScope::kRunMicrotasks);
v8::Local<v8::String> source =

Powered by Google App Engine
This is Rietveld 408576698