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

Unified Diff: chrome/test/chromedriver/devtools_client_impl.h

Issue 11975003: [ChromeDriver] Add support for attaching multiple DevToolsEventListeners to a DevToolsClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added OVERRIDE. Created 7 years, 11 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 | « chrome/test/chromedriver/devtools_client.h ('k') | chrome/test/chromedriver/devtools_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/devtools_client_impl.h
diff --git a/chrome/test/chromedriver/devtools_client_impl.h b/chrome/test/chromedriver/devtools_client_impl.h
index 876881700956e6824c83b7b96b77f3f1a9210827..5266df6f1d620672528d994763654a9d20e14bef 100644
--- a/chrome/test/chromedriver/devtools_client_impl.h
+++ b/chrome/test/chromedriver/devtools_client_impl.h
@@ -5,6 +5,7 @@
#ifndef CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_
#define CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_
+#include <list>
#include <string>
#include "base/basictypes.h"
@@ -51,8 +52,7 @@ class DevToolsClientImpl : public DevToolsClient {
public:
// Listener may be NULL.
DevToolsClientImpl(const SyncWebSocketFactory& factory,
- const std::string& url,
- DevToolsEventListener* listener);
+ const std::string& url);
typedef base::Callback<bool(
const std::string&,
@@ -62,7 +62,6 @@ class DevToolsClientImpl : public DevToolsClient {
internal::InspectorCommandResponse*)> ParserFunc;
DevToolsClientImpl(const SyncWebSocketFactory& factory,
const std::string& url,
- DevToolsEventListener* listener,
const ParserFunc& parser_func);
virtual ~DevToolsClientImpl();
@@ -74,16 +73,19 @@ class DevToolsClientImpl : public DevToolsClient {
const std::string& method,
const base::DictionaryValue& params,
scoped_ptr<base::DictionaryValue>* result) OVERRIDE;
+ virtual void AddListener(DevToolsEventListener* listener) OVERRIDE;
private:
Status SendCommandInternal(
const std::string& method,
const base::DictionaryValue& params,
scoped_ptr<base::DictionaryValue>* result);
+ virtual void NotifyEventListeners(const std::string& method,
+ const base::DictionaryValue& params);
scoped_ptr<SyncWebSocket> socket_;
GURL url_;
- DevToolsEventListener* listener_;
ParserFunc parser_func_;
+ std::list<DevToolsEventListener*> listeners_;
bool connected_;
int next_id_;
« no previous file with comments | « chrome/test/chromedriver/devtools_client.h ('k') | chrome/test/chromedriver/devtools_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698