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 "core/inspector/protocol/Forward.h" | 9 #include "core/inspector/protocol/Forward.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 void restore(); | 50 void restore(); |
51 void dispose(); | 51 void dispose(); |
52 void didCommitLoadForLocalFrame(LocalFrame*); | 52 void didCommitLoadForLocalFrame(LocalFrame*); |
53 void dispatchProtocolMessage(const String& method, const String& message); | 53 void dispatchProtocolMessage(const String& method, const String& message); |
54 void flushProtocolNotifications() override; | 54 void flushProtocolNotifications() override; |
55 | 55 |
56 DECLARE_TRACE(); | 56 DECLARE_TRACE(); |
57 | 57 |
58 private: | 58 private: |
59 // protocol::FrontendChannel implementation. | 59 // protocol::FrontendChannel implementation. |
60 void sendProtocolResponse(int callId, const String& message) override; | 60 void sendProtocolResponse( |
61 void sendProtocolNotification(const String& message) override; | 61 int callId, |
| 62 std::unique_ptr<protocol::Serializable> message) override; |
| 63 void sendProtocolNotification( |
| 64 std::unique_ptr<protocol::Serializable> message) override; |
62 | 65 |
63 // v8_inspector::V8Inspector::Channel implementation. | 66 // v8_inspector::V8Inspector::Channel implementation. |
| 67 void sendResponse( |
| 68 int callId, |
| 69 std::unique_ptr<v8_inspector::StringBuffer> message) override; |
| 70 void sendNotification( |
| 71 std::unique_ptr<v8_inspector::StringBuffer> message) override; |
| 72 // TODO(kozyatinskiy): remove it. |
64 void sendProtocolResponse(int callId, | 73 void sendProtocolResponse(int callId, |
65 const v8_inspector::StringView& message) override; | 74 const v8_inspector::StringView& message) {} |
66 void sendProtocolNotification( | 75 void sendProtocolNotification(const v8_inspector::StringView& message) {} |
67 const v8_inspector::StringView& message) override; | 76 |
| 77 void sendProtocolResponse(int callId, const String& message); |
68 | 78 |
69 Client* m_client; | 79 Client* m_client; |
70 std::unique_ptr<v8_inspector::V8InspectorSession> m_v8Session; | 80 std::unique_ptr<v8_inspector::V8InspectorSession> m_v8Session; |
71 int m_sessionId; | 81 int m_sessionId; |
72 bool m_disposed; | 82 bool m_disposed; |
73 Member<InstrumentingAgents> m_instrumentingAgents; | 83 Member<InstrumentingAgents> m_instrumentingAgents; |
74 std::unique_ptr<protocol::UberDispatcher> m_inspectorBackendDispatcher; | 84 std::unique_ptr<protocol::UberDispatcher> m_inspectorBackendDispatcher; |
75 std::unique_ptr<protocol::DictionaryValue> m_state; | 85 std::unique_ptr<protocol::DictionaryValue> m_state; |
76 HeapVector<Member<InspectorAgent>> m_agents; | 86 HeapVector<Member<InspectorAgent>> m_agents; |
77 Vector<String> m_notificationQueue; | 87 class Notification; |
| 88 Vector<std::unique_ptr<Notification>> m_notificationQueue; |
78 String m_lastSentState; | 89 String m_lastSentState; |
79 }; | 90 }; |
80 | 91 |
81 } // namespace blink | 92 } // namespace blink |
82 | 93 |
83 #endif // !defined(InspectorSession_h) | 94 #endif // !defined(InspectorSession_h) |
OLD | NEW |