Index: components/devtools_bridge/client/web_client.h |
diff --git a/components/devtools_bridge/client/web_client.h b/components/devtools_bridge/client/web_client.h |
index d980e8710954d76abd3a540d67b41a5a9c0f8a1b..7d5f597a64dc3749ce83a6d42d423a74d55981f8 100644 |
--- a/components/devtools_bridge/client/web_client.h |
+++ b/components/devtools_bridge/client/web_client.h |
@@ -5,6 +5,9 @@ |
#ifndef COMPONENTS_DEVTOOLS_BRIDGE_CLIENT_WEB_CLIENT_H_ |
#define COMPONENTS_DEVTOOLS_BRIDGE_CLIENT_WEB_CLIENT_H_ |
+#include <string> |
+ |
+#include "base/callback.h" |
#include "base/memory/scoped_ptr.h" |
namespace content { |
@@ -21,10 +24,16 @@ namespace devtools_bridge { |
*/ |
class WebClient { |
public: |
+ typedef base::Callback<void (const std::string& respose)> |
+ CommandSuccessCallback; |
+ typedef base::Closure CommandFailureCallback; |
+ |
class Delegate { |
public: |
- // TODO(serya): implement |
+ virtual void SendCommand(const std::string& command, |
+ const CommandSuccessCallback& sucess_callback, |
+ const CommandFailureCallback& failure_callback) {} |
}; |
virtual ~WebClient() {} |
@@ -32,6 +41,10 @@ class WebClient { |
static scoped_ptr<WebClient> CreateInstance( |
content::BrowserContext* context, Delegate* delegate); |
+ virtual void Connect(const std::string& device_id) = 0; |
+ virtual void Disconnect(const std::string& device_id) = 0; |
+ virtual void DisconnectAll() = 0; |
+ |
// TODO(serya): Implement. |
protected: |