| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |