| OLD | NEW |
| 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/PlatformExport.h" | 8 #include "platform/inspector_protocol/Platform.h" |
| 9 #include "platform/inspector_protocol/String16.h" | 9 #include "platform/inspector_protocol/String16.h" |
| 10 #include "wtf/PtrUtil.h" | |
| 11 | 10 |
| 12 #include <v8.h> | 11 #include <v8.h> |
| 13 | 12 |
| 14 namespace blink { | 13 namespace blink { |
| 15 | 14 |
| 16 class V8ContextInfo; | 15 class V8ContextInfo; |
| 17 class V8DebuggerClient; | 16 class V8DebuggerClient; |
| 18 class V8InspectorSession; | 17 class V8InspectorSession; |
| 19 class V8InspectorSessionClient; | 18 class V8InspectorSessionClient; |
| 20 class V8StackTrace; | 19 class V8StackTrace; |
| 21 | 20 |
| 22 namespace protocol { | 21 namespace protocol { |
| 23 class DictionaryValue; | 22 class DictionaryValue; |
| 23 class FrontendChannel; |
| 24 } | 24 } |
| 25 | 25 |
| 26 class PLATFORM_EXPORT V8Debugger { | 26 class PLATFORM_EXPORT V8Debugger { |
| 27 public: | 27 public: |
| 28 static std::unique_ptr<V8Debugger> create(v8::Isolate*, V8DebuggerClient*); | 28 static std::unique_ptr<V8Debugger> create(v8::Isolate*, V8DebuggerClient*); |
| 29 virtual ~V8Debugger() { } | 29 virtual ~V8Debugger() { } |
| 30 | 30 |
| 31 // TODO(dgozman): make this non-static? | 31 // TODO(dgozman): make this non-static? |
| 32 static int contextId(v8::Local<v8::Context>); | 32 static int contextId(v8::Local<v8::Context>); |
| 33 | 33 |
| 34 virtual void contextCreated(const V8ContextInfo&) = 0; | 34 virtual void contextCreated(const V8ContextInfo&) = 0; |
| 35 virtual void contextDestroyed(v8::Local<v8::Context>) = 0; | 35 virtual void contextDestroyed(v8::Local<v8::Context>) = 0; |
| 36 // TODO(dgozman): remove this one. | 36 // TODO(dgozman): remove this one. |
| 37 virtual void resetContextGroup(int contextGroupId) = 0; | 37 virtual void resetContextGroup(int contextGroupId) = 0; |
| 38 virtual void willExecuteScript(v8::Local<v8::Context>, int scriptId) = 0; | 38 virtual void willExecuteScript(v8::Local<v8::Context>, int scriptId) = 0; |
| 39 virtual void didExecuteScript(v8::Local<v8::Context>) = 0; | 39 virtual void didExecuteScript(v8::Local<v8::Context>) = 0; |
| 40 virtual void idleStarted() = 0; | 40 virtual void idleStarted() = 0; |
| 41 virtual void idleFinished() = 0; | 41 virtual void idleFinished() = 0; |
| 42 | 42 |
| 43 virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId, V8In
spectorSessionClient*, const String16* state) = 0; | 43 virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId, prot
ocol::FrontendChannel*, V8InspectorSessionClient*, const String16* state) = 0; |
| 44 virtual bool isPaused() = 0; | 44 virtual bool isPaused() = 0; |
| 45 | 45 |
| 46 static v8::Local<v8::Private> scopeExtensionPrivate(v8::Isolate*); | 46 static v8::Local<v8::Private> scopeExtensionPrivate(v8::Isolate*); |
| 47 static bool isCommandLineAPIMethod(const String16& name); | 47 static bool isCommandLineAPIMethod(const String16& name); |
| 48 static bool isCommandLineAPIGetter(const String16& name); | 48 static bool isCommandLineAPIGetter(const String16& name); |
| 49 | 49 |
| 50 virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTr
ace>) = 0; | 50 virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTr
ace>) = 0; |
| 51 virtual std::unique_ptr<V8StackTrace> captureStackTrace(size_t maxStackSize)
= 0; | 51 virtual std::unique_ptr<V8StackTrace> captureStackTrace(size_t maxStackSize)
= 0; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace blink | 54 } // namespace blink |
| 55 | 55 |
| 56 | 56 |
| 57 #endif // V8Debugger_h | 57 #endif // V8Debugger_h |
| OLD | NEW |