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

Side by Side Diff: components/ui_devtools/devtools_client.h

Issue 2462843002: Update ash to use new devtools base agent (Closed)
Patch Set: Rename devtools_dom_agent.* to ash_devtools_dom_agent.* Created 4 years, 1 month 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
« no previous file with comments | « ash/common/wm_shell.cc ('k') | components/ui_devtools/devtools_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 COMPONENTS_UI_DEVTOOLS_DEVTOOLS_CLIENT_H_ 5 #ifndef COMPONENTS_UI_DEVTOOLS_DEVTOOLS_CLIENT_H_
6 #define COMPONENTS_UI_DEVTOOLS_DEVTOOLS_CLIENT_H_ 6 #define COMPONENTS_UI_DEVTOOLS_DEVTOOLS_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/ui_devtools/DOM.h" 10 #include "components/ui_devtools/DOM.h"
(...skipping 11 matching lines...) Expand all
22 // etc). This client is then attached to the UiDevToolsServer and all messages 22 // etc). This client is then attached to the UiDevToolsServer and all messages
23 // from this client are sent over the web socket owned by the server. 23 // from this client are sent over the web socket owned by the server.
24 class UiDevToolsClient : public protocol::FrontendChannel { 24 class UiDevToolsClient : public protocol::FrontendChannel {
25 public: 25 public:
26 static const int kNotConnected = -1; 26 static const int kNotConnected = -1;
27 27
28 UiDevToolsClient(const std::string& name, UiDevToolsServer* server); 28 UiDevToolsClient(const std::string& name, UiDevToolsServer* server);
29 ~UiDevToolsClient() override; 29 ~UiDevToolsClient() override;
30 30
31 void AddAgent(std::unique_ptr<UiDevToolsAgent> agent); 31 void AddAgent(std::unique_ptr<UiDevToolsAgent> agent);
32 // TODO(mhashmi): Remove when ash is updated to use the new base agent
33 void AddDOMBackend(std::unique_ptr<protocol::DOM::Backend> backend);
34 void Dispatch(const std::string& data); 32 void Dispatch(const std::string& data);
35 33
36 bool connected() const; 34 bool connected() const;
37 void set_connection_id(int connection_id); 35 void set_connection_id(int connection_id);
38 const std::string& name() const; 36 const std::string& name() const;
39 37
40 private: 38 private:
41 // protocol::FrontendChannel 39 // protocol::FrontendChannel
42 void sendProtocolResponse(int callId, const String& message) override; 40 void sendProtocolResponse(int callId, const String& message) override;
43 void sendProtocolNotification(const String& message) override; 41 void sendProtocolNotification(const String& message) override;
44 void flushProtocolNotifications() override; 42 void flushProtocolNotifications() override;
45 43
46 std::string name_; 44 std::string name_;
47 int connection_id_; 45 int connection_id_;
48 46
49 std::vector<std::unique_ptr<UiDevToolsAgent>> agents_; 47 std::vector<std::unique_ptr<UiDevToolsAgent>> agents_;
50 std::unique_ptr<protocol::DOM::Backend> dom_backend_;
51 protocol::UberDispatcher dispatcher_; 48 protocol::UberDispatcher dispatcher_;
52 UiDevToolsServer* server_; 49 UiDevToolsServer* server_;
53 50
54 DISALLOW_COPY_AND_ASSIGN(UiDevToolsClient); 51 DISALLOW_COPY_AND_ASSIGN(UiDevToolsClient);
55 }; 52 };
56 53
57 } // namespace devtools 54 } // namespace devtools
58 } // namespace ui 55 } // namespace ui
59 56
60 #endif // COMPONENTS_UI_DEVTOOLS_DEVTOOLS_CLIENT_H_ 57 #endif // COMPONENTS_UI_DEVTOOLS_DEVTOOLS_CLIENT_H_
OLDNEW
« no previous file with comments | « ash/common/wm_shell.cc ('k') | components/ui_devtools/devtools_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698