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 // Maximum numer of lines to record in the debug log. | 5 // Maximum numer of lines to record in the debug log. |
6 // Only the most recent <n> lines are displayed. | 6 // Only the most recent <n> lines are displayed. |
7 var MAX_DEBUG_LOG_SIZE = 1000; | 7 var MAX_DEBUG_LOG_SIZE = 1000; |
8 var remoting = chrome.extension.getBackgroundPage().remoting; | 8 var remoting = chrome.extension.getBackgroundPage().remoting; |
9 | 9 |
10 // Message id so that we can identify (and ignore) message fade operations for | 10 // Message id so that we can identify (and ignore) message fade operations for |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 function toggleScaleToFit() { | 148 function toggleScaleToFit() { |
149 remoting.scaleToFit = !remoting.scaleToFit; | 149 remoting.scaleToFit = !remoting.scaleToFit; |
150 document.getElementById('scale_to_fit_toggle').value = | 150 document.getElementById('scale_to_fit_toggle').value = |
151 remoting.scaleToFit ? 'No scaling' : 'Scale to fit'; | 151 remoting.scaleToFit ? 'No scaling' : 'Scale to fit'; |
152 remoting.plugin.setScaleToFit(remoting.scaleToFit); | 152 remoting.plugin.setScaleToFit(remoting.scaleToFit); |
153 } | 153 } |
154 | 154 |
155 /** | 155 /** |
156 * This is the callback method that the plugin calls to request username and | 156 * This is the callback method that the plugin calls to request username and |
157 * password for logging into the remote host. For Me2Mom we are pre-authorized | 157 * password for logging into the remote host. For Me2Mom we are pre-authorized |
158 * so this should never be called. | 158 * so this is a no-op. |
159 */ | 159 */ |
160 function loginChallengeCallback() { | 160 function loginChallengeCallback() { |
161 console.log("loginChallengeCallback called unexpectedly!"); | |
162 } | 161 } |
163 | 162 |
164 /** | 163 /** |
165 * This is a callback that gets called when the desktop size contained in the | 164 * This is a callback that gets called when the desktop size contained in the |
166 * the plugin has changed. | 165 * the plugin has changed. |
167 */ | 166 */ |
168 function desktopSizeChanged() { | 167 function desktopSizeChanged() { |
169 var width = remoting.plugin.desktopWidth; | 168 var width = remoting.plugin.desktopWidth; |
170 var height = remoting.plugin.desktopHeight; | 169 var height = remoting.plugin.desktopHeight; |
171 | 170 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 setClientStateMessage( | 309 setClientStateMessage( |
311 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + 'Kbps' + | 310 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + 'Kbps' + |
312 ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' + | 311 ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' + |
313 ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' + | 312 ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' + |
314 ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' + | 313 ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' + |
315 ', render: ' + videoRenderLatency.toFixed(2) + 'ms'); | 314 ', render: ' + videoRenderLatency.toFixed(2) + 'ms'); |
316 | 315 |
317 // Update the stats once per second. | 316 // Update the stats once per second. |
318 window.setTimeout('updateStatusBarStats()', 1000); | 317 window.setTimeout('updateStatusBarStats()', 1000); |
319 } | 318 } |
OLD | NEW |