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

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

Issue 7547001: Propagate connected user to web app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 4 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 var remoting = remoting || {}; 5 var remoting = remoting || {};
6 6
7 (function() { 7 (function() {
8 'use strict'; 8 'use strict';
9 9
10 window.addEventListener('blur', pluginLostFocus_, false); 10 window.addEventListener('blur', pluginLostFocus_, false);
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 remoting.updateAccessCodeTimeoutElement_(); 325 remoting.updateAccessCodeTimeoutElement_();
326 updateTimeoutStyles_(); 326 updateTimeoutStyles_();
327 remoting.setMode(remoting.AppMode.HOST_WAITING_FOR_CONNECTION); 327 remoting.setMode(remoting.AppMode.HOST_WAITING_FOR_CONNECTION);
328 } else { 328 } else {
329 // This can only happen if the access code takes more than 5m to get from 329 // This can only happen if the access code takes more than 5m to get from
330 // the cloud to the web-app, so we don't care how clean this UX is. 330 // the cloud to the web-app, so we don't care how clean this UX is.
331 remoting.debug.log('Access code already invalid on receipt!'); 331 remoting.debug.log('Access code already invalid on receipt!');
332 remoting.cancelShare(); 332 remoting.cancelShare();
333 } 333 }
334 } else if (state == plugin.CONNECTED) { 334 } else if (state == plugin.CONNECTED) {
335 var element = document.getElementById('host-shared-message');
336 var client = plugin.client;
337 l10n.localizeElement(element, client);
335 remoting.setMode(remoting.AppMode.HOST_SHARED); 338 remoting.setMode(remoting.AppMode.HOST_SHARED);
336 disableTimeoutCountdown_(); 339 disableTimeoutCountdown_();
337 } else if (state == plugin.DISCONNECTED) { 340 } else if (state == plugin.DISCONNECTED) {
338 remoting.setMode(remoting.AppMode.HOST_UNSHARED); 341 remoting.setMode(remoting.AppMode.HOST_UNSHARED);
339 plugin.parentNode.removeChild(plugin); 342 plugin.parentNode.removeChild(plugin);
340 } else { 343 } else {
341 remoting.debug.log('Unknown state -> ' + state); 344 remoting.debug.log('Unknown state -> ' + state);
342 } 345 }
343 } 346 }
344 347
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 remoting.disconnect = function() { 608 remoting.disconnect = function() {
606 if (remoting.session) { 609 if (remoting.session) {
607 remoting.session.disconnect(); 610 remoting.session.disconnect();
608 remoting.session = null; 611 remoting.session = null;
609 remoting.debug.log('Disconnected.'); 612 remoting.debug.log('Disconnected.');
610 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED); 613 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED);
611 } 614 }
612 } 615 }
613 616
614 }()); 617 }());
OLDNEW
« remoting/host/plugin/host_script_object.cc ('K') | « remoting/webapp/me2mom/l10n.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698