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

Unified Diff: remoting/webapp/crd/js/hangout_session.js

Issue 973333002: Remove Hangout Remote Desktop integration code from the webapp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + manifest changes Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | remoting/webapp/crd/js/it2me_helpee_channel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/hangout_session.js
diff --git a/remoting/webapp/crd/js/hangout_session.js b/remoting/webapp/crd/js/hangout_session.js
deleted file mode 100644
index ac46f1e56983d1cc74365d9d4eefd76ae87e39cb..0000000000000000000000000000000000000000
--- a/remoting/webapp/crd/js/hangout_session.js
+++ /dev/null
@@ -1,81 +0,0 @@
-// 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.
-
-/**
- * @fileoverview
- * Class to communicate with the background scripts via chrome runtime
- * messages to
- * 1. Forward session state notifications
- * 2. Closes the window when the session terminates
- */
-
-'use strict';
-
-/** @suppress {duplicate} */
-var remoting = remoting || {};
-
-/**
- * @constructor
- * @param {string} senderId id of the current tab or window.
- */
-remoting.HangoutSession = function(senderId) {
- /**
- * @private
- * @type {chrome.runtime.Port}
- */
- this.port_ = null;
-
- /**
- * @private
- * @type {string}
- */
- this.senderId_ = senderId;
-};
-
-remoting.HangoutSession.prototype.init = function() {
- var portName = 'it2me.helper.webapp@' + this.senderId_;
- this.port_ = chrome.runtime.connect({name: portName});
-
- remoting.hangoutSessionEvents.addEventListener(
- remoting.hangoutSessionEvents.sessionStateChanged,
- this.onSessionStateChanged_.bind(this));
-};
-
-/**
- * @param {remoting.ClientSession.State=} state
- */
-remoting.HangoutSession.prototype.onSessionStateChanged_ = function(state) {
- var State = remoting.ClientSession.State;
- try {
- this.port_.postMessage({method: 'sessionStateChanged', state: state});
- } catch (/** @type {Error} */ error) {
- // postMessage will throw an exception if the port is disconnected.
- // We can safely ignore this exception.
- console.error(error);
- } finally {
- if (state === State.FAILED || state === State.CLOSED) {
- // close the current window
- if (base.isAppsV2()) {
- chrome.app.window.current().close();
- } else {
- window.close();
- }
- }
- }
-};
-
-
-/**
- * remoting.clientSession does not exist until the session is connected.
- * hangoutSessionEvents serves as a global event source to plumb session
- * state changes until we cleanup clientSession and sessionConnector.
- * @type {base.EventSourceImpl}
- */
-remoting.hangoutSessionEvents = new base.EventSourceImpl();
-
-/** @type {string} */
-remoting.hangoutSessionEvents.sessionStateChanged = "sessionStateChanged";
-
-remoting.hangoutSessionEvents.defineEvents(
- [remoting.hangoutSessionEvents.sessionStateChanged]);
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | remoting/webapp/crd/js/it2me_helpee_channel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698