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

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

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: all tests pass Created 4 years, 6 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 V8Debugger_h 5 #ifndef V8Debugger_h
6 #define V8Debugger_h 6 #define V8Debugger_h
7 7
8 #include "platform/inspector_protocol/Collections.h"
8 #include "platform/inspector_protocol/Platform.h" 9 #include "platform/inspector_protocol/Platform.h"
9 #include "platform/inspector_protocol/String16.h" 10 #include "platform/inspector_protocol/String16.h"
11 #include "platform/v8_inspector/public/V8ConsoleTypes.h"
10 12
11 #include <v8.h> 13 #include <v8.h>
12 14
13 namespace blink { 15 namespace blink {
14 16
15 class V8ContextInfo; 17 class V8ContextInfo;
16 class V8DebuggerClient; 18 class V8DebuggerClient;
17 class V8InspectorSession; 19 class V8InspectorSession;
18 class V8InspectorSessionClient; 20 class V8InspectorSessionClient;
19 class V8StackTrace; 21 class V8StackTrace;
20 22
21 namespace protocol { 23 namespace protocol {
22 class DictionaryValue; 24 class DictionaryValue;
23 class FrontendChannel; 25 class FrontendChannel;
24 } 26 }
25 27
26 class PLATFORM_EXPORT V8Debugger { 28 class PLATFORM_EXPORT V8Debugger {
27 public: 29 public:
28 static std::unique_ptr<V8Debugger> create(v8::Isolate*, V8DebuggerClient*); 30 static std::unique_ptr<V8Debugger> create(v8::Isolate*, V8DebuggerClient*);
29 virtual ~V8Debugger() { } 31 virtual ~V8Debugger() { }
30 32
31 // TODO(dgozman): make this non-static?
32 static int contextId(v8::Local<v8::Context>);
33
34 virtual void contextCreated(const V8ContextInfo&) = 0; 33 virtual void contextCreated(const V8ContextInfo&) = 0;
35 virtual void contextDestroyed(v8::Local<v8::Context>) = 0; 34 virtual void contextDestroyed(v8::Local<v8::Context>) = 0;
36 // TODO(dgozman): remove this one. 35 // TODO(dgozman): remove this one.
37 virtual void resetContextGroup(int contextGroupId) = 0; 36 virtual void resetContextGroup(int contextGroupId) = 0;
38 virtual void willExecuteScript(v8::Local<v8::Context>, int scriptId) = 0; 37 virtual void willExecuteScript(v8::Local<v8::Context>, int scriptId) = 0;
39 virtual void didExecuteScript(v8::Local<v8::Context>) = 0; 38 virtual void didExecuteScript(v8::Local<v8::Context>) = 0;
40 virtual void idleStarted() = 0; 39 virtual void idleStarted() = 0;
41 virtual void idleFinished() = 0; 40 virtual void idleFinished() = 0;
41 // TODO(dgozman): remove requestIdentifier.
42 virtual bool addConsoleMessage(int contextGroupId, MessageSource, MessageLev el, const String16& message, const String16& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace>, int scriptId, const String16& reque stIdentifier) = 0;
43 virtual void logToConsole(v8::Local<v8::Context>, const String16& message, p rotocol::Vector<v8::Local<v8::Value>>* arguments) = 0;
44 virtual unsigned promiseRejected(v8::Local<v8::Context>, const String16& err orMessage, v8::Local<v8::Value> reason, const String16& url, unsigned lineNumber , unsigned columnNumber, std::unique_ptr<V8StackTrace>, int scriptId) = 0;
45 virtual void promiseRejectionRevoked(v8::Local<v8::Context>, unsigned promis eRejectionId) = 0;
46 virtual protocol::Vector<unsigned> consoleMessageArgumentCounts(int contextG roupId) = 0;
47 // TODO(dgozman): remove mute methods.
48 virtual void muteConsole() = 0;
49 virtual void unmuteConsole() = 0;
42 50
43 virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId, prot ocol::FrontendChannel*, V8InspectorSessionClient*, const String16* state) = 0; 51 virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId, prot ocol::FrontendChannel*, V8InspectorSessionClient*, const String16* state) = 0;
44 virtual bool isPaused() = 0; 52 virtual bool isPaused() = 0;
45 53
46 virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTr ace>) = 0; 54 virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTr ace>) = 0;
47 virtual std::unique_ptr<V8StackTrace> captureStackTrace(size_t maxStackSize) = 0; 55 virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0;
48 }; 56 };
49 57
50 } // namespace blink 58 } // namespace blink
51 59
52 60
53 #endif // V8Debugger_h 61 #endif // V8Debugger_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698