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

Side by Side Diff: remoting/webapp/hangout_session.js

Issue 450383003: Hangout remote desktop part II - background.html and AppLauncher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR Feedbacks Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class to communicate with the background scripts via chrome runtime 7 * Class to communicate with the background scripts via chrome runtime
8 * messages to 8 * messages to
9 * 1. Forward session state notifications 9 * 1. Forward session state notifications
10 * 2. Closes the window when the session terminates 10 * 2. Closes the window when the session terminates
11 */ 11 */
12 12
13 'use strict'; 13 'use strict';
14 14
15 /** @suppress {duplicate} */ 15 /** @suppress {duplicate} */
16 var remoting = remoting || {}; 16 var remoting = remoting || {};
17 17
18 /** 18 /**
19 * @constructor 19 * @constructor
20 */ 20 */
21 remoting.HangoutSession = function() { 21 remoting.HangoutSession = function() {
22 /** 22 /**
23 * @private 23 * @private
24 * @type {chrome.extension.Port} 24 * @type {chrome.runtime.Port}
25 */ 25 */
26 this.port_ = null; 26 this.port_ = null;
27 }; 27 };
28 28
29 remoting.HangoutSession.prototype.init = function() { 29 remoting.HangoutSession.prototype.init = function() {
30 this.port_ = chrome.runtime.connect({name: 'it2me.helper.webapp'}); 30 this.port_ = chrome.runtime.connect({name: 'it2me.helper.webapp'});
31 31
32 remoting.hangoutSessionEvents.addEventListener( 32 remoting.hangoutSessionEvents.addEventListener(
33 remoting.hangoutSessionEvents.sessionStateChanged, 33 remoting.hangoutSessionEvents.sessionStateChanged,
34 this.onSessionStateChanged_.bind(this)); 34 this.onSessionStateChanged_.bind(this));
(...skipping 28 matching lines...) Expand all
63 * state changes until we cleanup clientSession and sessionConnector. 63 * state changes until we cleanup clientSession and sessionConnector.
64 * @type {base.EventSource} 64 * @type {base.EventSource}
65 */ 65 */
66 remoting.hangoutSessionEvents = new base.EventSource(); 66 remoting.hangoutSessionEvents = new base.EventSource();
67 67
68 /** @type {string} */ 68 /** @type {string} */
69 remoting.hangoutSessionEvents.sessionStateChanged = "sessionStateChanged"; 69 remoting.hangoutSessionEvents.sessionStateChanged = "sessionStateChanged";
70 70
71 remoting.hangoutSessionEvents.defineEvents( 71 remoting.hangoutSessionEvents.defineEvents(
72 [remoting.hangoutSessionEvents.sessionStateChanged]); 72 [remoting.hangoutSessionEvents.sessionStateChanged]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698