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

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

Issue 895723006: Fix It2Me Host doesn't kill the native process after canceling a share (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: remoting/webapp/crd/js/host_session.js
diff --git a/remoting/webapp/crd/js/host_session.js b/remoting/webapp/crd/js/host_session.js
index 7fb84328835afdbf423c73d675c38600d087ac1d..80023b322c3ca9c4cdca50df2af5a226b4dfbcb3 100644
--- a/remoting/webapp/crd/js/host_session.js
+++ b/remoting/webapp/crd/js/host_session.js
@@ -11,19 +11,24 @@
* should be purely thought of as a controller of sorts.
*/
-'use strict';
-
/** @suppress {duplicate} */
var remoting = remoting || {};
+(function() {
+
+'use strict';
+
/**
* @constructor
+ * @implements {base.Disposable}
*/
remoting.HostSession = function() {
/** @type {remoting.It2MeHostFacade} @private */
this.hostFacade_ = null;
};
+})();
kelvinp 2015/02/04 01:38:10 JsCompile cannot handle enums (remoting.HostSessio
Sergey Ulanov 2015/02/04 19:52:46 I didn't have any problems with it inside dns_blac
Jamie 2015/02/04 21:02:39 Alternatively, you could get rid of the IIFE for t
kelvinp 2015/02/04 21:36:15 This is because BlackholeState is not referenced a
+
// Note that these values are copied directly from host_script_object.h and
// must be kept in sync.
/** @enum {number} */
@@ -39,6 +44,13 @@ remoting.HostSession.State = {
INVALID_DOMAIN_ERROR: 7
};
+(function() {
+
+remoting.HostSession.prototype.dispose = function() {
+ base.dispose(this.hostFacade_);
+ this.hostFacade_ = null;
+};
+
/**
* @param {string} stateString The string representation of the host state.
* @return {remoting.HostSession.State} The HostSession.State enum value
@@ -50,7 +62,7 @@ remoting.HostSession.State.fromString = function(stateString) {
return remoting.HostSession.State.UNKNOWN;
}
return remoting.HostSession.State[stateString];
-}
+};
/**
* Initiates a connection.
@@ -114,3 +126,5 @@ remoting.HostSession.prototype.getClient = function() {
remoting.HostSession.prototype.disconnect = function() {
this.hostFacade_.disconnect();
};
+
+})();

Powered by Google App Engine
This is Rietveld 408576698