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

Unified Diff: components/devtools_bridge/client/web_client.h

Issue 746663002: Stub for WebRTCDeviceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webclient
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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..a1e0075dcce122add9821088660ac80307c4fa0c 100644
--- a/components/devtools_bridge/client/web_client.h
+++ b/components/devtools_bridge/client/web_client.h
@@ -5,8 +5,15 @@
#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 base {
+class DictionaryValue;
+}
+
namespace content {
class BrowserContext;
}
@@ -21,10 +28,16 @@ namespace devtools_bridge {
*/
class WebClient {
public:
+ typedef base::Callback<void (scoped_ptr<const base::DictionaryValue>)>
+ CommandSuccessCallback;
+ typedef base::Closure CommandFailureCallback;
+
class Delegate {
public:
- // TODO(serya): implement
+ virtual void SendCommand(const base::DictionaryValue* command,
+ const CommandSuccessCallback& sucess_callback,
+ const CommandFailureCallback& failure_callback) {}
};
virtual ~WebClient() {}
@@ -32,6 +45,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:

Powered by Google App Engine
This is Rietveld 408576698