| OLD | NEW |
| 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 InspectorSession_h | 5 #ifndef InspectorSession_h |
| 6 #define InspectorSession_h | 6 #define InspectorSession_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "platform/inspector_protocol/DispatcherBase.h" | 10 #include "platform/inspector_protocol/DispatcherBase.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 , public V8InspectorSessionClient | 30 , public V8InspectorSessionClient |
| 31 , public protocol::FrontendChannel { | 31 , public protocol::FrontendChannel { |
| 32 WTF_MAKE_NONCOPYABLE(InspectorSession); | 32 WTF_MAKE_NONCOPYABLE(InspectorSession); |
| 33 public: | 33 public: |
| 34 class Client { | 34 class Client { |
| 35 public: | 35 public: |
| 36 virtual void sendProtocolMessage(int sessionId, int callId, const String
& response, const String& state) = 0; | 36 virtual void sendProtocolMessage(int sessionId, int callId, const String
& response, const String& state) = 0; |
| 37 virtual void resumeStartup() { } | 37 virtual void resumeStartup() { } |
| 38 virtual void profilingStarted() { } | 38 virtual void profilingStarted() { } |
| 39 virtual void profilingStopped() { } | 39 virtual void profilingStopped() { } |
| 40 virtual void consoleEnabled() { } | |
| 41 virtual void consoleCleared() { } | 40 virtual void consoleCleared() { } |
| 42 virtual ~Client() {} | 41 virtual ~Client() {} |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 InspectorSession(Client*, InspectedFrames*, InstrumentingAgents*, int sessio
nId, bool autoFlush, V8Debugger*, int contextGroupId, const String* savedState); | 44 InspectorSession(Client*, InspectedFrames*, InstrumentingAgents*, int sessio
nId, bool autoFlush, V8Debugger*, int contextGroupId, const String* savedState); |
| 46 ~InspectorSession() override; | 45 ~InspectorSession() override; |
| 47 int sessionId() { return m_sessionId; } | 46 int sessionId() { return m_sessionId; } |
| 48 V8InspectorSession* v8Session() { return m_v8Session.get(); } | 47 V8InspectorSession* v8Session() { return m_v8Session.get(); } |
| 49 | 48 |
| 50 void append(InspectorAgent*); | 49 void append(InspectorAgent*); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 61 void sendProtocolResponse(int callId, const protocol::String16& message) ove
rride; | 60 void sendProtocolResponse(int callId, const protocol::String16& message) ove
rride; |
| 62 void sendProtocolNotification(const protocol::String16& message) override; | 61 void sendProtocolNotification(const protocol::String16& message) override; |
| 63 | 62 |
| 64 // V8InspectorSessionClient implementation. | 63 // V8InspectorSessionClient implementation. |
| 65 void runtimeEnabled() override; | 64 void runtimeEnabled() override; |
| 66 void runtimeDisabled() override; | 65 void runtimeDisabled() override; |
| 67 void resumeStartup() override; | 66 void resumeStartup() override; |
| 68 bool canExecuteScripts() override; | 67 bool canExecuteScripts() override; |
| 69 void profilingStarted() override; | 68 void profilingStarted() override; |
| 70 void profilingStopped() override; | 69 void profilingStopped() override; |
| 71 void consoleEnabled() override; | |
| 72 void consoleCleared() override; | 70 void consoleCleared() override; |
| 73 | 71 |
| 74 Client* m_client; | 72 Client* m_client; |
| 75 std::unique_ptr<V8InspectorSession> m_v8Session; | 73 std::unique_ptr<V8InspectorSession> m_v8Session; |
| 76 int m_sessionId; | 74 int m_sessionId; |
| 77 bool m_autoFlush; | 75 bool m_autoFlush; |
| 78 bool m_disposed; | 76 bool m_disposed; |
| 79 Member<InspectedFrames> m_inspectedFrames; | 77 Member<InspectedFrames> m_inspectedFrames; |
| 80 Member<InstrumentingAgents> m_instrumentingAgents; | 78 Member<InstrumentingAgents> m_instrumentingAgents; |
| 81 std::unique_ptr<protocol::UberDispatcher> m_inspectorBackendDispatcher; | 79 std::unique_ptr<protocol::UberDispatcher> m_inspectorBackendDispatcher; |
| 82 std::unique_ptr<protocol::DictionaryValue> m_state; | 80 std::unique_ptr<protocol::DictionaryValue> m_state; |
| 83 HeapVector<Member<InspectorAgent>> m_agents; | 81 HeapVector<Member<InspectorAgent>> m_agents; |
| 84 Vector<protocol::String16> m_notificationQueue; | 82 Vector<protocol::String16> m_notificationQueue; |
| 85 String m_lastSentState; | 83 String m_lastSentState; |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 } // namespace blink | 86 } // namespace blink |
| 89 | 87 |
| 90 #endif // !defined(InspectorSession_h) | 88 #endif // !defined(InspectorSession_h) |
| OLD | NEW |