OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_DEVTOOLS_CLIENT_H |
| 6 #define UI_DEVTOOLS_CLIENT_H |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "ui/devtools/DOM.h" |
| 11 #include "ui/devtools/Forward.h" |
| 12 #include "ui/devtools/Protocol.h" |
| 13 #include "ui/devtools/StringUtil.h" |
| 14 |
| 15 namespace ui { |
| 16 namespace devtools { |
| 17 |
| 18 class UiDevToolsServer; |
| 19 class UiDevToolsClient : public protocol::FrontendChannel { |
| 20 public: |
| 21 UiDevToolsClient(String name, UiDevToolsServer* server); |
| 22 ~UiDevToolsClient() override; |
| 23 |
| 24 void AddDOMBackend(std::unique_ptr<protocol::DOM::Backend> dom_backend); |
| 25 |
| 26 private: |
| 27 friend class UiDevToolsServer; |
| 28 void Dispatch(const String& data); |
| 29 |
| 30 // FrontendChannel |
| 31 void sendProtocolResponse(int callId, const String& message) override; |
| 32 void sendProtocolNotification(const String& message) override; |
| 33 void flushProtocolNotifications() override; |
| 34 |
| 35 std::string name_; |
| 36 int connected_client_id; |
| 37 |
| 38 std::unique_ptr<protocol::DOM::Backend> dom_backend_; |
| 39 protocol::UberDispatcher dispatcher_; |
| 40 UiDevToolsServer* server_; |
| 41 }; |
| 42 |
| 43 } // namespace devtools |
| 44 } // namespace ui |
| 45 |
| 46 #endif // UI_DEVTOOLS_CLIENT_H_ |
OLD | NEW |