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

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

Issue 803653004: Update Chromoting to use /third_party/closure_compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused types 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * Functions related to the 'client screen' for Chromoting. 7 * Functions related to the 'client screen' for Chromoting.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 remoting.clientSession.disconnect(remoting.Error.NONE); 58 remoting.clientSession.disconnect(remoting.Error.NONE);
59 remoting.clientSession = null; 59 remoting.clientSession = null;
60 console.log('Disconnected.'); 60 console.log('Disconnected.');
61 }; 61 };
62 62
63 /** 63 /**
64 * Callback function called when the state of the client plugin changes. The 64 * Callback function called when the state of the client plugin changes. The
65 * current and previous states are available via the |state| member variable. 65 * current and previous states are available via the |state| member variable.
66 * 66 *
67 * @param {remoting.ClientSession.StateEvent} state 67 * @param {remoting.ClientSession.StateEvent=} state
68 */ 68 */
69 function onClientStateChange_(state) { 69 function onClientStateChange_(state) {
70 switch (state.current) { 70 switch (state.current) {
71 case remoting.ClientSession.State.CLOSED: 71 case remoting.ClientSession.State.CLOSED:
72 console.log('Connection closed by host'); 72 console.log('Connection closed by host');
73 if (remoting.clientSession.getMode() == 73 if (remoting.clientSession.getMode() ==
74 remoting.ClientSession.Mode.IT2ME) { 74 remoting.ClientSession.Mode.IT2ME) {
75 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME); 75 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME);
76 remoting.hangoutSessionEvents.raiseEvent( 76 remoting.hangoutSessionEvents.raiseEvent(
77 remoting.hangoutSessionEvents.sessionStateChanged, 77 remoting.hangoutSessionEvents.sessionStateChanged,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 remoting.clientSession.getState() != 112 remoting.clientSession.getState() !=
113 remoting.ClientSession.State.CONNECTED) { 113 remoting.ClientSession.State.CONNECTED) {
114 return; 114 return;
115 } 115 }
116 var perfstats = remoting.clientSession.getPerfStats(); 116 var perfstats = remoting.clientSession.getPerfStats();
117 remoting.stats.update(perfstats); 117 remoting.stats.update(perfstats);
118 remoting.clientSession.logStatistics(perfstats); 118 remoting.clientSession.logStatistics(perfstats);
119 // Update the stats once per second. 119 // Update the stats once per second.
120 window.setTimeout(updateStatistics_, 1000); 120 window.setTimeout(updateStatistics_, 1000);
121 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698