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

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: copyright + rebase Created 9 years, 6 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
« no previous file with comments | « remoting/webapp/me2mom/remoting_session.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8
9 var remoting = chrome.extension.getBackgroundPage().remoting; 9 var remoting = chrome.extension.getBackgroundPage().remoting;
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 addToDebugLog('Connect as user ' + remoting.username); 141 addToDebugLog('Connect as user ' + remoting.username);
142 142
143 // TODO(garykac): Clean exit if |connect| isn't a function. 143 // TODO(garykac): Clean exit if |connect| isn't a function.
144 if (typeof plugin.connect === 'function') { 144 if (typeof plugin.connect === 'function') {
145 if (remoting.connectMethod == 'sandboxed') { 145 if (remoting.connectMethod == 'sandboxed') {
146 registerConnection(); 146 registerConnection();
147 } else { 147 } else {
148 plugin.connectUnsandboxed(remoting.hostjid, remoting.username, 148 plugin.connectUnsandboxed(remoting.hostjid, remoting.username,
149 remoting.xmppAuthToken, remoting.accessCode); 149 'oauth2:' + remoting.oauth2.getAccessToken(),
150 remoting.accessCode);
150 } 151 }
151 } else { 152 } else {
152 addToDebugLog('ERROR: remoting plugin not loaded'); 153 addToDebugLog('ERROR: remoting plugin not loaded');
153 setClientStateMessage('Plugin not loaded'); 154 setClientStateMessage('Plugin not loaded');
154 } 155 }
155 156
156 } 157 }
157 158
158 function toggleDebugLog() { 159 function toggleDebugLog() {
159 debugLog = document.getElementById('debug_log'); 160 debugLog = document.getElementById('debug_log');
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 setClientStateMessage( 347 setClientStateMessage(
347 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + units + 348 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + units +
348 ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' + 349 ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' +
349 ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' + 350 ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' +
350 ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' + 351 ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' +
351 ', render: ' + videoRenderLatency.toFixed(2) + 'ms'); 352 ', render: ' + videoRenderLatency.toFixed(2) + 'ms');
352 353
353 // Update the stats once per second. 354 // Update the stats once per second.
354 window.setTimeout('updateStatusBarStats()', 1000); 355 window.setTimeout('updateStatusBarStats()', 1000);
355 } 356 }
OLDNEW
« no previous file with comments | « remoting/webapp/me2mom/remoting_session.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698