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

Side by Side Diff: remoting/webapp/crd/js/desktop_connected_view.js

Issue 944123003: Hack webapp to request keyboard events on connection. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hacked up chromoting client and using mouse lock instead of keyboard lock for bubble. Created 5 years, 10 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
« no previous file with comments | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | remoting/webapp/crd/manifest.json.jinja2 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class handling user-facing aspects of the client session. 7 * Class handling user-facing aspects of the client session.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 if (remoting.optionsMenu) { 397 if (remoting.optionsMenu) {
398 remoting.optionsMenu.setDesktopConnectedView(null); 398 remoting.optionsMenu.setDesktopConnectedView(null);
399 } 399 }
400 400
401 document.body.classList.remove('connected'); 401 document.body.classList.remove('connected');
402 this.container_.removeEventListener( 402 this.container_.removeEventListener(
403 'mousemove', this.updateMouseCursorPosition_, true); 403 'mousemove', this.updateMouseCursorPosition_, true);
404 // Stop listening for full-screen events. 404 // Stop listening for full-screen events.
405 remoting.fullscreen.removeListener(this.callOnFullScreenChanged_); 405 remoting.fullscreen.removeListener(this.callOnFullScreenChanged_);
406 406
407 // Disable keyboard events.
408 chrome.app.window.current().setInterceptAllKeys(false);
407 } else { 409 } else {
408 if (remoting.windowFrame) { 410 if (remoting.windowFrame) {
409 remoting.windowFrame.setDesktopConnectedView(this); 411 remoting.windowFrame.setDesktopConnectedView(this);
410 } 412 }
411 if (remoting.toolbar) { 413 if (remoting.toolbar) {
412 remoting.toolbar.setDesktopConnectedView(this); 414 remoting.toolbar.setDesktopConnectedView(this);
413 } 415 }
414 if (remoting.optionsMenu) { 416 if (remoting.optionsMenu) {
415 remoting.optionsMenu.setDesktopConnectedView(this); 417 remoting.optionsMenu.setDesktopConnectedView(this);
416 } 418 }
417 419
418 if (this.getResizeToClient()) { 420 if (this.getResizeToClient()) {
419 this.notifyClientResolution_(); 421 this.notifyClientResolution_();
420 } 422 }
421 423
424 // Enable keyboard events.
425 chrome.app.window.current().setInterceptAllKeys(true);
426
422 document.body.classList.add('connected'); 427 document.body.classList.add('connected');
423 this.container_.addEventListener( 428 this.container_.addEventListener(
424 'mousemove', this.updateMouseCursorPosition_, true); 429 'mousemove', this.updateMouseCursorPosition_, true);
425 // Activate full-screen related UX. 430 // Activate full-screen related UX.
426 remoting.fullscreen.addListener(this.callOnFullScreenChanged_); 431 remoting.fullscreen.addListener(this.callOnFullScreenChanged_);
427 this.onDesktopSizeChanged_(); 432 this.onDesktopSizeChanged_();
428 this.setFocusHandlers_(); 433 this.setFocusHandlers_();
429 } 434 }
430 }; 435 };
431 436
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 * @param {Object} message The parsed extension message data. 1051 * @param {Object} message The parsed extension message data.
1047 * @return {boolean} True if the message was recognized, false otherwise. 1052 * @return {boolean} True if the message was recognized, false otherwise.
1048 */ 1053 */
1049 remoting.DesktopConnectedView.prototype.handleExtensionMessage = 1054 remoting.DesktopConnectedView.prototype.handleExtensionMessage =
1050 function(type, message) { 1055 function(type, message) {
1051 if (this.videoFrameRecorder_) { 1056 if (this.videoFrameRecorder_) {
1052 return this.videoFrameRecorder_.handleMessage(type, message); 1057 return this.videoFrameRecorder_.handleMessage(type, message);
1053 } 1058 }
1054 return false; 1059 return false;
1055 }; 1060 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | remoting/webapp/crd/manifest.json.jinja2 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698