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

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

Issue 7316011: Release all keys on blur. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid error messages on blur before the session is created. Created 9 years, 5 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/client/plugin/chromoting_scriptable_object.cc ('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 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);
11
12 function pluginLostFocus_() {
13 // If the plug loses input focus, release all keys as a precaution against
14 // leaving them 'stuck down' on the host.
15 if (remoting.session && remoting.session.plugin) {
16 remoting.session.plugin.releaseAllKeys();
17 }
18 }
19
10 /** @enum {string} */ 20 /** @enum {string} */
11 remoting.AppMode = { 21 remoting.AppMode = {
12 CLIENT: 'client', 22 CLIENT: 'client',
13 HOST: 'host', 23 HOST: 'host',
14 IN_SESSION: 'in-session' 24 IN_SESSION: 'in-session'
15 }; 25 };
16 26
17 remoting.EMAIL = 'email'; 27 remoting.EMAIL = 'email';
18 remoting.HOST_PLUGIN_ID = 'host-plugin-id'; 28 remoting.HOST_PLUGIN_ID = 'host-plugin-id';
19 29
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 } 518 }
509 519
510 remoting.toggleScaleToFit = function() { 520 remoting.toggleScaleToFit = function() {
511 remoting.scaleToFit = !remoting.scaleToFit; 521 remoting.scaleToFit = !remoting.scaleToFit;
512 document.getElementById('scale-to-fit-toggle').value = 522 document.getElementById('scale-to-fit-toggle').value =
513 remoting.scaleToFit ? 'No scaling' : 'Scale to fit'; 523 remoting.scaleToFit ? 'No scaling' : 'Scale to fit';
514 remoting.session.toggleScaleToFit(remoting.scaleToFit); 524 remoting.session.toggleScaleToFit(remoting.scaleToFit);
515 } 525 }
516 526
517 }()); 527 }());
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698