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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 V8InspectorSessionImpl_h 5 #ifndef V8InspectorSessionImpl_h
6 #define V8InspectorSessionImpl_h 6 #define V8InspectorSessionImpl_h
7 7
8 #include "platform/inspector_protocol/InspectorProtocol.h" 8 #include "platform/inspector_protocol/InspectorProtocol.h"
9 #include "platform/v8_inspector/protocol/Runtime.h" 9 #include "platform/v8_inspector/protocol/Runtime.h"
10 #include "platform/v8_inspector/protocol/Schema.h" 10 #include "platform/v8_inspector/protocol/Schema.h"
(...skipping 13 matching lines...) Expand all
24 class V8HeapProfilerAgentImpl; 24 class V8HeapProfilerAgentImpl;
25 class V8ProfilerAgentImpl; 25 class V8ProfilerAgentImpl;
26 class V8RuntimeAgentImpl; 26 class V8RuntimeAgentImpl;
27 class V8SchemaAgentImpl; 27 class V8SchemaAgentImpl;
28 28
29 namespace protocol = blink::protocol; 29 namespace protocol = blink::protocol;
30 30
31 class V8InspectorSessionImpl : public V8InspectorSession { 31 class V8InspectorSessionImpl : public V8InspectorSession {
32 PROTOCOL_DISALLOW_COPY(V8InspectorSessionImpl); 32 PROTOCOL_DISALLOW_COPY(V8InspectorSessionImpl);
33 public: 33 public:
34 static std::unique_ptr<V8InspectorSessionImpl> create(V8InspectorImpl*, int contextGroupId, protocol::FrontendChannel*, const String16* state); 34 static std::unique_ptr<V8InspectorSessionImpl> create(V8InspectorImpl*, int contextGroupId, protocol::FrontendChannel*, const StringView& state);
35 ~V8InspectorSessionImpl(); 35 ~V8InspectorSessionImpl();
36 36
37 V8InspectorImpl* inspector() const { return m_inspector; } 37 V8InspectorImpl* inspector() const { return m_inspector; }
38 V8ConsoleAgentImpl* consoleAgent() { return m_consoleAgent.get(); } 38 V8ConsoleAgentImpl* consoleAgent() { return m_consoleAgent.get(); }
39 V8DebuggerAgentImpl* debuggerAgent() { return m_debuggerAgent.get(); } 39 V8DebuggerAgentImpl* debuggerAgent() { return m_debuggerAgent.get(); }
40 V8SchemaAgentImpl* schemaAgent() { return m_schemaAgent.get(); } 40 V8SchemaAgentImpl* schemaAgent() { return m_schemaAgent.get(); }
41 V8ProfilerAgentImpl* profilerAgent() { return m_profilerAgent.get(); } 41 V8ProfilerAgentImpl* profilerAgent() { return m_profilerAgent.get(); }
42 V8RuntimeAgentImpl* runtimeAgent() { return m_runtimeAgent.get(); } 42 V8RuntimeAgentImpl* runtimeAgent() { return m_runtimeAgent.get(); }
43 int contextGroupId() const { return m_contextGroupId; } 43 int contextGroupId() const { return m_contextGroupId; }
44 44
45 InjectedScript* findInjectedScript(ErrorString*, int contextId); 45 InjectedScript* findInjectedScript(ErrorString*, int contextId);
46 InjectedScript* findInjectedScript(ErrorString*, RemoteObjectIdBase*); 46 InjectedScript* findInjectedScript(ErrorString*, RemoteObjectIdBase*);
47 void reset(); 47 void reset();
48 void discardInjectedScripts(); 48 void discardInjectedScripts();
49 void reportAllContexts(V8RuntimeAgentImpl*); 49 void reportAllContexts(V8RuntimeAgentImpl*);
50 void setCustomObjectFormatterEnabled(bool); 50 void setCustomObjectFormatterEnabled(bool);
51 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Co ntext>, v8::Local<v8::Value>, const String16& groupName, bool generatePreview); 51 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Co ntext>, v8::Local<v8::Value>, const String16& groupName, bool generatePreview);
52 std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Con text>, v8::Local<v8::Value> table, v8::Local<v8::Value> columns); 52 std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Con text>, v8::Local<v8::Value> table, v8::Local<v8::Value> columns);
53 std::vector<std::unique_ptr<protocol::Schema::Domain>> supportedDomainsImpl( ); 53 std::vector<std::unique_ptr<protocol::Schema::Domain>> supportedDomainsImpl( );
54 void releaseObjectGroup(const String16& objectGroup);
54 55
55 // V8InspectorSession implementation. 56 // V8InspectorSession implementation.
56 void dispatchProtocolMessage(const String16& message) override; 57 void dispatchProtocolMessage(const StringView& message) override;
57 String16 stateJSON() override; 58 std::unique_ptr<StringBuffer> stateJSON() override;
58 std::unique_ptr<protocol::Array<protocol::Schema::API::Domain>> supportedDom ains() override; 59 std::unique_ptr<blink::protocol::Array<blink::protocol::Schema::API::Domain> > supportedDomains() override;
59 void addInspectedObject(std::unique_ptr<V8InspectorSession::Inspectable>) ov erride; 60 void addInspectedObject(std::unique_ptr<V8InspectorSession::Inspectable>) ov erride;
60 void schedulePauseOnNextStatement(const String16& breakReason, const String1 6& breakDetails) override; 61 void schedulePauseOnNextStatement(const StringView& breakReason, const Strin gView& breakDetails) override;
61 void cancelPauseOnNextStatement() override; 62 void cancelPauseOnNextStatement() override;
62 void breakProgram(const String16& breakReason, const String16& breakDetails) override; 63 void breakProgram(const StringView& breakReason, const StringView& breakDeta ils) override;
63 void setSkipAllPauses(bool) override; 64 void setSkipAllPauses(bool) override;
64 void resume() override; 65 void resume() override;
65 void stepOver() override; 66 void stepOver() override;
66 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> searc hInTextByLines(const String16& text, const String16& query, bool caseSensitive, bool isRegex) override; 67 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> searc hInTextByLines(const StringView& text, const StringView& query, bool caseSensiti ve, bool isRegex) override;
67 void releaseObjectGroup(const String16& objectGroup) override; 68 void releaseObjectGroup(const StringView& objectGroup) override;
68 bool unwrapObject(ErrorString*, const String16& objectId, v8::Local<v8::Valu e>*, v8::Local<v8::Context>*, String16* objectGroup) override; 69 bool unwrapObject(ErrorString*, const StringView& objectId, v8::Local<v8::Va lue>*, v8::Local<v8::Context>*, std::unique_ptr<StringBuffer>* objectGroup) over ride;
69 std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(v8::Local<v 8::Context>, v8::Local<v8::Value>, const String16& groupName) override; 70 std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(v8::Local<v 8::Context>, v8::Local<v8::Value>, const StringView& groupName) override;
70 71
71 V8InspectorSession::Inspectable* inspectedObject(unsigned num); 72 V8InspectorSession::Inspectable* inspectedObject(unsigned num);
72 static const unsigned kInspectedObjectBufferSize = 5; 73 static const unsigned kInspectedObjectBufferSize = 5;
73 74
74 private: 75 private:
75 V8InspectorSessionImpl(V8InspectorImpl*, int contextGroupId, protocol::Front endChannel*, const String16* state); 76 V8InspectorSessionImpl(V8InspectorImpl*, int contextGroupId, protocol::Front endChannel*, const StringView& state);
76 protocol::DictionaryValue* agentState(const String16& name); 77 protocol::DictionaryValue* agentState(const String16& name);
77 78
78 int m_contextGroupId; 79 int m_contextGroupId;
79 V8InspectorImpl* m_inspector; 80 V8InspectorImpl* m_inspector;
80 bool m_customObjectFormatterEnabled; 81 bool m_customObjectFormatterEnabled;
81 82
82 protocol::UberDispatcher m_dispatcher; 83 protocol::UberDispatcher m_dispatcher;
83 std::unique_ptr<protocol::DictionaryValue> m_state; 84 std::unique_ptr<protocol::DictionaryValue> m_state;
84 85
85 std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent; 86 std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent;
86 std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent; 87 std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent;
87 std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent; 88 std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent;
88 std::unique_ptr<V8ProfilerAgentImpl> m_profilerAgent; 89 std::unique_ptr<V8ProfilerAgentImpl> m_profilerAgent;
89 std::unique_ptr<V8ConsoleAgentImpl> m_consoleAgent; 90 std::unique_ptr<V8ConsoleAgentImpl> m_consoleAgent;
90 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent; 91 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent;
91 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>> m_inspectedObj ects; 92 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>> m_inspectedObj ects;
92 }; 93 };
93 94
94 } // namespace v8_inspector 95 } // namespace v8_inspector
95 96
96 #endif 97 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698