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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorClient.h

Issue 2260233002: [DevTools] Migrate v8_inspector/public from String16 to String{View,Buffer}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: styling 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8InspectorClient_h 5 #ifndef V8InspectorClient_h
6 #define V8InspectorClient_h 6 #define V8InspectorClient_h
7 7
8 #include "platform/inspector_protocol/InspectorProtocol.h" 8 #include "platform/v8_inspector/public/StringBuffer.h"
9 #include "platform/v8_inspector/public/StringView.h"
9 10
10 #include <v8.h> 11 #include <v8.h>
11 12
12 namespace v8_inspector { 13 namespace v8_inspector {
13 14
14 class V8StackTrace; 15 class V8StackTrace;
15 16
16 enum class V8ConsoleAPIType { kClear, kDebug, kLog, kInfo, kWarning, kError }; 17 enum class V8ConsoleAPIType { kClear, kDebug, kLog, kInfo, kWarning, kError };
17 18
18 class PLATFORM_EXPORT V8InspectorClient { 19 class PLATFORM_EXPORT V8InspectorClient {
19 public: 20 public:
20 virtual ~V8InspectorClient() { } 21 virtual ~V8InspectorClient() { }
21 22
22 virtual void runMessageLoopOnPause(int contextGroupId) { } 23 virtual void runMessageLoopOnPause(int contextGroupId) { }
23 virtual void quitMessageLoopOnPause() { } 24 virtual void quitMessageLoopOnPause() { }
24 virtual void runIfWaitingForDebugger(int contextGroupId) { } 25 virtual void runIfWaitingForDebugger(int contextGroupId) { }
25 26
26 virtual void muteMetrics(int contextGroupId) { } 27 virtual void muteMetrics(int contextGroupId) { }
27 virtual void unmuteMetrics(int contextGroupId) { } 28 virtual void unmuteMetrics(int contextGroupId) { }
28 29
29 virtual void beginUserGesture() { } 30 virtual void beginUserGesture() { }
30 virtual void endUserGesture() { } 31 virtual void endUserGesture() { }
31 32
32 virtual String16 valueSubtype(v8::Local<v8::Value>) { return String16(); } 33 virtual std::unique_ptr<StringBuffer> valueSubtype(v8::Local<v8::Value>) { r eturn nullptr; }
33 virtual bool formatAccessorsAsProperties(v8::Local<v8::Value>) { return fals e; } 34 virtual bool formatAccessorsAsProperties(v8::Local<v8::Value>) { return fals e; }
34 virtual bool isInspectableHeapObject(v8::Local<v8::Object>) { return true; } 35 virtual bool isInspectableHeapObject(v8::Local<v8::Object>) { return true; }
35 36
36 virtual v8::Local<v8::Context> ensureDefaultContextInGroup(int contextGroupI d) { return v8::Local<v8::Context>(); } 37 virtual v8::Local<v8::Context> ensureDefaultContextInGroup(int contextGroupI d) { return v8::Local<v8::Context>(); }
37 virtual void beginEnsureAllContextsInGroup(int contextGroupId) { } 38 virtual void beginEnsureAllContextsInGroup(int contextGroupId) { }
38 virtual void endEnsureAllContextsInGroup(int contextGroupId) { } 39 virtual void endEnsureAllContextsInGroup(int contextGroupId) { }
39 40
40 virtual void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Loc al<v8::Object>) { } 41 virtual void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Loc al<v8::Object>) { }
41 virtual void consoleAPIMessage(int contextGroupId, V8ConsoleAPIType, const S tring16& message, const String16& url, unsigned lineNumber, unsigned columnNumbe r, V8StackTrace*) { } 42 virtual void consoleAPIMessage(int contextGroupId, V8ConsoleAPIType, const S tringView& message, const StringView& url, unsigned lineNumber, unsigned columnN umber, V8StackTrace*) { }
42 virtual v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Con text>) { return v8::MaybeLocal<v8::Value>(); } 43 virtual v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Con text>) { return v8::MaybeLocal<v8::Value>(); }
43 44
44 virtual void consoleTime(const String16& title) { } 45 virtual void consoleTime(const StringView& title) { }
45 virtual void consoleTimeEnd(const String16& title) { } 46 virtual void consoleTimeEnd(const StringView& title) { }
46 virtual void consoleTimeStamp(const String16& title) { } 47 virtual void consoleTimeStamp(const StringView& title) { }
47 virtual double currentTimeMS() { return 0; } 48 virtual double currentTimeMS() { return 0; }
48 typedef void (*TimerCallback)(void*); 49 typedef void (*TimerCallback)(void*);
49 virtual void startRepeatingTimer(double, TimerCallback, void* data) { } 50 virtual void startRepeatingTimer(double, TimerCallback, void* data) { }
50 virtual void cancelTimer(void* data) { } 51 virtual void cancelTimer(void* data) { }
51 52
52 // TODO(dgozman): this was added to support service worker shadow page. We s hould not connect at all. 53 // TODO(dgozman): this was added to support service worker shadow page. We s hould not connect at all.
53 virtual bool canExecuteScripts(int contextGroupId) { return true; } 54 virtual bool canExecuteScripts(int contextGroupId) { return true; }
54 }; 55 };
55 56
56 } // namespace v8_inspector 57 } // namespace v8_inspector
57 58
58 59
59 #endif // V8InspectorClient_h 60 #endif // V8InspectorClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698