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

Side by Side Diff: components/devtools_bridge/client/js/web_client.js

Issue 746663002: Stub for WebRTCDeviceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webclient
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 *
7 * @constructor
8 */
9 function WebClient() {
10 this.sessions_ = {};
mnaganov (inactive) 2014/11/21 21:19:38 Wrong indentation.
SeRya 2014/11/24 11:10:06 Done.
11 this.gcdClient_ = new GCDClient();
12 }
13
14 WebClient.prototype.startSession = function(deviceId) {
15 console.log("Starting session " + deviceId);
mnaganov (inactive) 2014/11/21 21:19:38 Please prefer using single quotes.
16 this.sessions_[deviceId] = new ClientSession(deviceId, this.gcdClient_);
17 this.sessions_[deviceId].start();
18 };
19
20 WebClient.prototype.stopSession = function(deviceId) {
21 console.log("Stopping session " + deviceId);
22 this.sessions_[deviceId].stop();
23 delete this.sessions_[deviceId];
24 };
25
26 window.addEventListener("load", function() {
27 window.WebClient.instance = new WebClient();
28 if (chrome.send)
29 chrome.send('loaded');
30 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698