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

Unified Diff: remoting/webapp/background/background.js

Issue 468693002: Hangouts remote desktop part III - It2MeService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/background/background.js
diff --git a/remoting/webapp/background/background.js b/remoting/webapp/background/background.js
index 5f2678898e2a13f6e782b0c85e16586463091920..919a1f79c8abb0f0aa0a197e2b1f70b41082856f 100644
--- a/remoting/webapp/background/background.js
+++ b/remoting/webapp/background/background.js
@@ -43,6 +43,23 @@ function initializeAppV2(appLauncher) {
);
}
+/**
+ * The background service is responsible for listening to incoming connection
+ * requests from Hangouts and the webapp.
+ *
+ * @param {remoting.AppLauncher} appLauncher
+ */
+ function initializeBackgroundService(appLauncher) {
+ /** @type {remoting.It2MeService} */
+ var it2meService = new remoting.It2MeService(appLauncher);
+ it2meService.init();
+ remoting.it2meService = it2meService;
+
+ chrome.runtime.onSuspend.addListener(function() {
+ it2meService.dispose();
Jamie 2014/08/13 01:44:52 Reset remoting.it2meService to null? In fact, it m
kelvinp 2014/08/13 23:44:09 Done.
+ });
+ }
+
function main() {
/** @type {remoting.AppLauncher} */
var appLauncher = new remoting.V1AppLauncher();
@@ -50,6 +67,7 @@ function main() {
appLauncher = new remoting.V2AppLauncher();
initializeAppV2(appLauncher);
}
+ initializeBackgroundService(appLauncher);
}
window.addEventListener('load', main, false);

Powered by Google App Engine
This is Rietveld 408576698