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

Unified Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.h

Issue 1992913006: [DevTools] Move monitor/unmonitor events CommandLineAPI to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-selectors-to-native
Patch Set: Created 4 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/core/inspector/ThreadDebugger.h
diff --git a/third_party/WebKit/Source/core/inspector/ThreadDebugger.h b/third_party/WebKit/Source/core/inspector/ThreadDebugger.h
index 1f9e1794454c1047f69c5781ddf3b906384a03d4..5dcbb0d4e21c64afea0b199bce813661cb21bafe 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.h
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.h
@@ -40,7 +40,8 @@ public:
bool isExecutionAllowed() override;
double currentTimeMS() override;
bool isInspectableHeapObject(v8::Local<v8::Object>) override;
- void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Local<v8::Object>) override { }
+ static bool isCommandLineAPIMethod(const String& name);
+ void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Local<v8::Object>) override;
void reportMessageToConsole(v8::Local<v8::Context>, MessageType, MessageLevel, const String16& message, const v8::FunctionCallbackInfo<v8::Value>* arguments, unsigned skipArgumentCount) final;
void consoleTime(const String16& title) override;
void consoleTimeEnd(const String16& title) override;
@@ -51,15 +52,26 @@ public:
V8Debugger* debugger() const { return m_debugger.get(); }
virtual bool isWorker() { return true; }
protected:
+ void createFunctionProperty(v8::Local<v8::Context>, v8::Local<v8::Object>, const char* name, v8::FunctionCallback, const char* description);
virtual void reportMessageToConsole(v8::Local<v8::Context>, ConsoleMessage*) = 0;
void onTimer(Timer<ThreadDebugger>*);
v8::Isolate* m_isolate;
OwnPtr<V8Debugger> m_debugger;
+
+private:
+ v8::Local<v8::Function> eventLogFunction();
+
+ static void setMonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>&, bool enabled);
+ static void monitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ static void unmonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ static void logCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
Vector<OwnPtr<Timer<ThreadDebugger>>> m_timers;
Vector<V8DebuggerClient::TimerCallback> m_timerCallbacks;
Vector<void*> m_timerData;
OwnPtr<UserGestureIndicator> m_userGestureIndicator;
+ v8::Global<v8::Function> m_eventLogFunction;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698