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

Side by Side Diff: remoting/webapp/crd/js/public_session_main.js

Issue 1370283004: [Chromoting] Remote Assistance in Public Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PublicSession
Patch Set: Fix GN build Created 5 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2015 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 /** @suppress {duplicate} */
6 var remoting = remoting || {};
7
8 (function() {
9
10 'use strict';
11
12 /** @constructor */
13 remoting.PublicSession = function() {
14 // Initialize global dependencies.
15 l10n.localize();
16 remoting.identity = new remoting.Identity();
17 remoting.settings = new remoting.Settings();
18
19 /** @private */
20 this.eventHooks_ = new base.Disposables(
21 new base.DomEventHook(document.getElementById('host-finished-button'),
22 'click', this.exit_.bind(this), false),
23 new base.DomEventHook(document.getElementById('cancel-share-button'),
24 'click', this.exit_.bind(this), false));
25 };
26
27 remoting.PublicSession.prototype.start = function() {
28 remoting.tryShare();
29 };
30
31 /** @private */
32 remoting.PublicSession.prototype.exit_ = function() {
33 base.dispose(this.eventHooks_);
34 this.eventHooks_ = null;
35 chrome.app.window.current().close();
36 };
37
38 window.addEventListener('load', function () {
39 remoting.publicSession = new remoting.PublicSession();
40 remoting.publicSession.start();
41 }, false);
42
43 })();
44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698