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

Unified Diff: components/ui_devtools/devtools_client.cc

Issue 2456643002: Create a base agent class for ui_devtools (Closed)
Patch Set: sadruls comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ui_devtools/devtools_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ui_devtools/devtools_client.cc
diff --git a/components/ui_devtools/devtools_client.cc b/components/ui_devtools/devtools_client.cc
index 89b42b84d4bce98ad24e9ac9efc7ec701afd065b..271fb5c94512d9351920aad38652e96feedc3852 100644
--- a/components/ui_devtools/devtools_client.cc
+++ b/components/ui_devtools/devtools_client.cc
@@ -4,7 +4,6 @@
#include "components/ui_devtools/devtools_client.h"
-#include "components/ui_devtools/Protocol.h"
#include "components/ui_devtools/devtools_server.h"
namespace ui {
@@ -21,6 +20,11 @@ UiDevToolsClient::UiDevToolsClient(const std::string& name,
UiDevToolsClient::~UiDevToolsClient() {}
+void UiDevToolsClient::AddAgent(std::unique_ptr<UiDevToolsAgent> agent) {
+ agent->Init(&dispatcher_);
+ agents_.push_back(std::move(agent));
+}
+
void UiDevToolsClient::AddDOMBackend(
std::unique_ptr<protocol::DOM::Backend> dom_backend) {
dom_backend_ = std::move(dom_backend);
« no previous file with comments | « components/ui_devtools/devtools_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698