OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_TEST_INSPECTOR_PROTOCOL_CHANNEL_IMPL_H_ |
| 6 #define V8_TEST_INSPECTOR_PROTOCOL_CHANNEL_IMPL_H_ |
| 7 |
| 8 #include "include/v8-inspector.h" |
| 9 #include "include/v8.h" |
| 10 #include "src/base/macros.h" |
| 11 |
| 12 namespace v8_inspector { |
| 13 |
| 14 class TaskQueue; |
| 15 |
| 16 class ChannelImpl final : public V8Inspector::Channel { |
| 17 public: |
| 18 ChannelImpl(TaskQueue* frontend_queue) : frontend_queue_(frontend_queue) {} |
| 19 virtual ~ChannelImpl() {} |
| 20 |
| 21 private: |
| 22 void sendProtocolResponse(int callId, const StringView& message) override { |
| 23 SendMessageToFrontend(message); |
| 24 } |
| 25 void sendProtocolNotification(const StringView& message) override { |
| 26 SendMessageToFrontend(message); |
| 27 } |
| 28 void flushProtocolNotifications() override {} |
| 29 void SendMessageToFrontend(const StringView& message); |
| 30 |
| 31 TaskQueue* frontend_queue_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); |
| 34 }; |
| 35 |
| 36 } // namespace v8_inspector |
| 37 |
| 38 #endif // V8_TEST_INSPECTOR_PROTOCOL_CHANNEL_IMPL_H_ |
OLD | NEW |