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 | |
sadrul
2016/10/17 16:05:08
UI_DEVTOOLS_DEVTOOLS_CLIENT_H_
Sarmad Hashmi
2016/10/17 16:58:21
Done.
| |
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 { | |
sadrul
2016/10/17 16:05:08
Document.
Sarmad Hashmi
2016/10/17 16:58:21
Done.
| |
20 public: | |
21 UiDevToolsClient(String name, UiDevToolsServer* server); | |
sadrul
2016/10/17 16:05:08
const String& name (to avoid unnecessary copy)
Sarmad Hashmi
2016/10/17 16:58:21
Done.
| |
22 ~UiDevToolsClient() override; | |
23 | |
24 void AddDOMBackend(std::unique_ptr<protocol::DOM::Backend> dom_backend); | |
25 | |
26 private: | |
27 static const int kNotConnected = -1; | |
28 | |
29 friend class UiDevToolsServer; | |
30 void Dispatch(const String& data); | |
31 bool connected(); | |
32 | |
33 // FrontendChannel | |
34 void sendProtocolResponse(int callId, const String& message) override; | |
35 void sendProtocolNotification(const String& message) override; | |
36 void flushProtocolNotifications() override; | |
37 | |
38 std::string name_; | |
39 int connection_id; | |
sadrul
2016/10/17 16:05:08
connection_id_
Sarmad Hashmi
2016/10/17 16:58:21
Done.
| |
40 | |
41 std::unique_ptr<protocol::DOM::Backend> dom_backend_; | |
42 protocol::UberDispatcher dispatcher_; | |
43 UiDevToolsServer* server_; | |
44 }; | |
sadrul
2016/10/17 16:05:08
DISALLOOW_COPY_AND_ASSIGN
Sarmad Hashmi
2016/10/17 16:58:21
Done.
| |
45 | |
46 } // namespace devtools | |
47 } // namespace ui | |
48 | |
49 #endif // UI_DEVTOOLS_CLIENT_H_ | |
OLD | NEW |