Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: ui/devtools/devtools_client.h

Issue 2374513002: Add ui devtools server (Closed)
Patch Set: Initial commit for ui devtools server Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698