OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * Class handling creation and teardown of a remoting client session. | 7 * Class handling creation and teardown of a remoting client session. |
8 * | 8 * |
9 * This abstracts a <embed> element and controls the plugin which does the | 9 * This abstracts a <embed> element and controls the plugin which does the |
10 * actual remoting work. There should be no UI code inside this class. It | 10 * actual remoting work. There should be no UI code inside this class. It |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 }; | 157 }; |
158 | 158 |
159 // TODO(ajwong): Is it even worth having this class handle these events? | 159 // TODO(ajwong): Is it even worth having this class handle these events? |
160 // Or would it be better to just allow users to pass in their own handlers | 160 // Or would it be better to just allow users to pass in their own handlers |
161 // and leave these blank by default? | 161 // and leave these blank by default? |
162 this.plugin.connectionInfoUpdate = function() { | 162 this.plugin.connectionInfoUpdate = function() { |
163 that.connectionInfoUpdateCallback(); | 163 that.connectionInfoUpdateCallback(); |
164 }; | 164 }; |
165 this.plugin.desktopSizeUpdate = function() { that.onDesktopSizeChanged_(); }; | 165 this.plugin.desktopSizeUpdate = function() { that.onDesktopSizeChanged_(); }; |
166 | 166 |
167 // For IT2Me, we are pre-authorized so there is no login challenge. | |
168 this.plugin.loginChallenge = function() {}; | |
169 | |
170 // TODO(garykac): Clean exit if |connect| isn't a function. | 167 // TODO(garykac): Clean exit if |connect| isn't a function. |
171 if (typeof this.plugin.connect === 'function') { | 168 if (typeof this.plugin.connect === 'function') { |
172 this.connectPluginToWcs_(oauth2AccessToken); | 169 this.connectPluginToWcs_(oauth2AccessToken); |
173 } else { | 170 } else { |
174 remoting.debug.log('ERROR: remoting plugin not loaded'); | 171 remoting.debug.log('ERROR: remoting plugin not loaded'); |
175 this.setState_(remoting.ClientSession.State.UNKNOWN_PLUGIN_ERROR); | 172 this.setState_(remoting.ClientSession.State.UNKNOWN_PLUGIN_ERROR); |
176 } | 173 } |
177 }; | 174 }; |
178 | 175 |
179 /** | 176 /** |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 return { | 405 return { |
409 'video_bandwidth': this.plugin.videoBandwidth, | 406 'video_bandwidth': this.plugin.videoBandwidth, |
410 'video_frame_rate': this.plugin.videoFramerate, | 407 'video_frame_rate': this.plugin.videoFramerate, |
411 'capture_latency': this.plugin.videoCaptureLatency, | 408 'capture_latency': this.plugin.videoCaptureLatency, |
412 'encode_latency': this.plugin.videoEncodeLatency, | 409 'encode_latency': this.plugin.videoEncodeLatency, |
413 'decode_latency': this.plugin.videoDecodeLatency, | 410 'decode_latency': this.plugin.videoDecodeLatency, |
414 'render_latency': this.plugin.videoRenderLatency, | 411 'render_latency': this.plugin.videoRenderLatency, |
415 'roundtrip_latency': this.plugin.roundTripLatency | 412 'roundtrip_latency': this.plugin.roundTripLatency |
416 }; | 413 }; |
417 }; | 414 }; |
OLD | NEW |