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

Side by Side Diff: src/inspector/public/V8InspectorClient.h

Issue 2292053003: [inspector] Build inspector under v8_enable_inspector build flag. (Closed)
Patch Set: owners Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_INSPECTOR_PUBLIC_V8INSPECTORCLIENT_H_
6 #define V8_INSPECTOR_PUBLIC_V8INSPECTORCLIENT_H_
7
8 #include "src/inspector/public/StringBuffer.h"
9 #include "src/inspector/public/StringView.h"
10
11 #include <v8.h>
12
13 namespace v8_inspector {
14
15 class V8StackTrace;
16
17 enum class V8ConsoleAPIType { kClear, kDebug, kLog, kInfo, kWarning, kError };
18
19 class PLATFORM_EXPORT V8InspectorClient {
20 public:
21 virtual ~V8InspectorClient() {}
22
23 virtual void runMessageLoopOnPause(int contextGroupId) {}
24 virtual void quitMessageLoopOnPause() {}
25 virtual void runIfWaitingForDebugger(int contextGroupId) {}
26
27 virtual void muteMetrics(int contextGroupId) {}
28 virtual void unmuteMetrics(int contextGroupId) {}
29
30 virtual void beginUserGesture() {}
31 virtual void endUserGesture() {}
32
33 virtual std::unique_ptr<StringBuffer> valueSubtype(v8::Local<v8::Value>) {
34 return nullptr;
35 }
36 virtual bool formatAccessorsAsProperties(v8::Local<v8::Value>) {
37 return false;
38 }
39 virtual bool isInspectableHeapObject(v8::Local<v8::Object>) { return true; }
40
41 virtual v8::Local<v8::Context> ensureDefaultContextInGroup(
42 int contextGroupId) {
43 return v8::Local<v8::Context>();
44 }
45 virtual void beginEnsureAllContextsInGroup(int contextGroupId) {}
46 virtual void endEnsureAllContextsInGroup(int contextGroupId) {}
47
48 virtual void installAdditionalCommandLineAPI(v8::Local<v8::Context>,
49 v8::Local<v8::Object>) {}
50 virtual void consoleAPIMessage(int contextGroupId, V8ConsoleAPIType,
51 const StringView& message,
52 const StringView& url, unsigned lineNumber,
53 unsigned columnNumber, V8StackTrace*) {}
54 virtual v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*,
55 v8::Local<v8::Context>) {
56 return v8::MaybeLocal<v8::Value>();
57 }
58
59 virtual void consoleTime(const StringView& title) {}
60 virtual void consoleTimeEnd(const StringView& title) {}
61 virtual void consoleTimeStamp(const StringView& title) {}
62 virtual double currentTimeMS() { return 0; }
63 typedef void (*TimerCallback)(void*);
64 virtual void startRepeatingTimer(double, TimerCallback, void* data) {}
65 virtual void cancelTimer(void* data) {}
66
67 // TODO(dgozman): this was added to support service worker shadow page. We
68 // should not connect at all.
69 virtual bool canExecuteScripts(int contextGroupId) { return true; }
70 };
71
72 } // namespace v8_inspector
73
74 #endif // V8_INSPECTOR_PUBLIC_V8INSPECTORCLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698