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

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

Issue 1738073002: DevTools: introduce protocol::Value, baseline for hierarchical data in remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/inspector_protocol/Frontend.h" 9 #include "platform/inspector_protocol/Frontend.h"
10 #include "wtf/Forward.h" 10 #include "wtf/Forward.h"
11 #include "wtf/PassOwnPtr.h" 11 #include "wtf/PassOwnPtr.h"
12 12
13 #include <v8.h> 13 #include <v8.h>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class JSONObject;
18 class V8DebuggerClient; 17 class V8DebuggerClient;
19 class V8StackTrace; 18 class V8StackTrace;
20 19
20 namespace protocol {
21 class DictionaryValue;
22 }
23
21 class PLATFORM_EXPORT V8Debugger { 24 class PLATFORM_EXPORT V8Debugger {
22 USING_FAST_MALLOC(V8Debugger); 25 USING_FAST_MALLOC(V8Debugger);
23 public: 26 public:
24 template <typename T> 27 template <typename T>
25 class Agent { 28 class Agent {
26 public: 29 public:
27 virtual void setInspectorState(PassRefPtr<JSONObject>) = 0; 30 virtual void setInspectorState(PassRefPtr<protocol::DictionaryValue>) = 0;
28 virtual void setFrontend(T*) = 0; 31 virtual void setFrontend(T*) = 0;
29 virtual void clearFrontend() = 0; 32 virtual void clearFrontend() = 0;
30 virtual void restore() = 0; 33 virtual void restore() = 0;
31 }; 34 };
32 35
33 static PassOwnPtr<V8Debugger> create(v8::Isolate*, V8DebuggerClient*); 36 static PassOwnPtr<V8Debugger> create(v8::Isolate*, V8DebuggerClient*);
34 virtual ~V8Debugger() { } 37 virtual ~V8Debugger() { }
35 38
36 // Each v8::Context is a part of a group. The group id is used to find appro apriate 39 // Each v8::Context is a part of a group. The group id is used to find appro apriate
37 // V8DebuggerAgent to notify about events in the context. 40 // V8DebuggerAgent to notify about events in the context.
38 // |contextGroupId| must be non-0. 41 // |contextGroupId| must be non-0.
39 static void setContextDebugData(v8::Local<v8::Context>, const String& type, int contextGroupId); 42 static void setContextDebugData(v8::Local<v8::Context>, const String& type, int contextGroupId);
40 static int contextId(v8::Local<v8::Context>); 43 static int contextId(v8::Local<v8::Context>);
41 44
42 static v8::Local<v8::Symbol> commandLineAPISymbol(v8::Isolate*); 45 static v8::Local<v8::Symbol> commandLineAPISymbol(v8::Isolate*);
43 static bool isCommandLineAPIMethod(const AtomicString& name); 46 static bool isCommandLineAPIMethod(const AtomicString& name);
44 47
45 virtual PassOwnPtr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t maxStackSize) = 0; 48 virtual PassOwnPtr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t maxStackSize) = 0;
46 virtual PassOwnPtr<V8StackTrace> captureStackTrace(size_t maxStackSize) = 0; 49 virtual PassOwnPtr<V8StackTrace> captureStackTrace(size_t maxStackSize) = 0;
47 }; 50 };
48 51
49 } // namespace blink 52 } // namespace blink
50 53
51 54
52 #endif // V8Debugger_h 55 #endif // V8Debugger_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698