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

Side by Side Diff: remoting/webapp/me2mom/remoting_session.js

Issue 7008003: Wire in OAuth2 support into non-sandboxed connections in libjingle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 plugin.loginChallenge = loginChallengeCallback; 117 plugin.loginChallenge = loginChallengeCallback;
118 118
119 addToDebugLog('Connect as user ' + remoting.username); 119 addToDebugLog('Connect as user ' + remoting.username);
120 120
121 // TODO(garykac): Clean exit if |connect| isn't a function. 121 // TODO(garykac): Clean exit if |connect| isn't a function.
122 if (typeof plugin.connect === 'function') { 122 if (typeof plugin.connect === 'function') {
123 if (remoting.connectMethod == 'sandboxed') { 123 if (remoting.connectMethod == 'sandboxed') {
124 registerConnection(); 124 registerConnection();
125 } else { 125 } else {
126 plugin.connectUnsandboxed(remoting.hostjid, remoting.username, 126 plugin.connectUnsandboxed(remoting.hostjid, remoting.username,
127 remoting.xmppAuthToken, remoting.accessCode); 127 'oauth2:' + remoting.oauth2.getAccessToken(),
128 remoting.accessCode);
128 } 129 }
129 } else { 130 } else {
130 addToDebugLog('ERROR: remoting plugin not loaded'); 131 addToDebugLog('ERROR: remoting plugin not loaded');
131 setClientStateMessage('Plugin not loaded'); 132 setClientStateMessage('Plugin not loaded');
132 } 133 }
133 134
134 } 135 }
135 136
136 function toggleDebugLog() { 137 function toggleDebugLog() {
137 debugLog = document.getElementById('debug_log'); 138 debugLog = document.getElementById('debug_log');
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 setClientStateMessage( 311 setClientStateMessage(
311 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + 'Kbps' + 312 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + 'Kbps' +
312 ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' + 313 ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' +
313 ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' + 314 ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' +
314 ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' + 315 ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' +
315 ', render: ' + videoRenderLatency.toFixed(2) + 'ms'); 316 ', render: ' + videoRenderLatency.toFixed(2) + 'ms');
316 317
317 // Update the stats once per second. 318 // Update the stats once per second.
318 window.setTimeout('updateStatusBarStats()', 1000); 319 window.setTimeout('updateStatusBarStats()', 1000);
319 } 320 }
OLDNEW
« remoting/webapp/me2mom/remoting.js ('K') | « remoting/webapp/me2mom/remoting_session.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698