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

Unified Diff: components/devtools_bridge/client/js/gcd_client.js

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/js/gcd_client.js
diff --git a/components/devtools_bridge/client/js/gcd_client.js b/components/devtools_bridge/client/js/gcd_client.js
new file mode 100644
index 0000000000000000000000000000000000000000..2369fc5f7ff39eabbb31e07a194fa1d0e950290a
--- /dev/null
+++ b/components/devtools_bridge/client/js/gcd_client.js
@@ -0,0 +1,20 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * This class responsible for communication with DevTools Bridge Server
+ * over GCD in request/response manner.
+ *
+ * @Constructor
+ */
+function GCDClient() {
+ this.lastLequestId_ = 0;
+}
+
+GCDClient.prototype.sendCommand = function(command) {
+ if (chrome.send)
+ chrome.send('sendCommand', [this.lastLequestId_++, command]);
+ else
+ console.log('Sending command', command)
mnaganov (inactive) 2014/11/24 11:47:20 Do you need this? In the next file, there is no "e
+}

Powered by Google App Engine
This is Rietveld 408576698