| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 if (remoting.toolbar) { | 300 if (remoting.toolbar) { |
| 301 remoting.toolbar.setDesktopConnectedView(this); | 301 remoting.toolbar.setDesktopConnectedView(this); |
| 302 } | 302 } |
| 303 if (remoting.optionsMenu) { | 303 if (remoting.optionsMenu) { |
| 304 remoting.optionsMenu.setDesktopConnectedView(this); | 304 remoting.optionsMenu.setDesktopConnectedView(this); |
| 305 } | 305 } |
| 306 | 306 |
| 307 document.body.classList.add('connected'); | 307 document.body.classList.add('connected'); |
| 308 this.container_.addEventListener( | 308 this.container_.addEventListener( |
| 309 'mousemove', this.updateMouseCursorPosition_, true); | 309 'mousemove', this.updateMouseCursorPosition_, true); |
| 310 |
| 310 // Activate full-screen related UX. | 311 // Activate full-screen related UX. |
| 311 remoting.fullscreen.addListener(this.callOnFullScreenChanged_); | 312 remoting.fullscreen.addListener(this.callOnFullScreenChanged_); |
| 313 this.onFullScreenChanged_(remoting.fullscreen.isActive()); |
| 312 this.setFocusHandlers_(); | 314 this.setFocusHandlers_(); |
| 313 } | 315 } |
| 314 }; | 316 }; |
| 315 | 317 |
| 316 /** | 318 /** |
| 317 * Constrains the focus to the plugin element. | 319 * Constrains the focus to the plugin element. |
| 318 * @private | 320 * @private |
| 319 */ | 321 */ |
| 320 remoting.DesktopConnectedView.prototype.setFocusHandlers_ = function() { | 322 remoting.DesktopConnectedView.prototype.setFocusHandlers_ = function() { |
| 321 this.plugin_.element().addEventListener( | 323 this.plugin_.element().addEventListener( |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 var rect = document.createElement('div'); | 576 var rect = document.createElement('div'); |
| 575 rect.classList.add('debug-region-rect'); | 577 rect.classList.add('debug-region-rect'); |
| 576 rect.style.left = rects[i][0] + 'px'; | 578 rect.style.left = rects[i][0] + 'px'; |
| 577 rect.style.top = rects[i][1] +'px'; | 579 rect.style.top = rects[i][1] +'px'; |
| 578 rect.style.width = rects[i][2] +'px'; | 580 rect.style.width = rects[i][2] +'px'; |
| 579 rect.style.height = rects[i][3] + 'px'; | 581 rect.style.height = rects[i][3] + 'px'; |
| 580 this.debugRegionContainer_.appendChild(rect); | 582 this.debugRegionContainer_.appendChild(rect); |
| 581 } | 583 } |
| 582 } | 584 } |
| 583 } | 585 } |
| OLD | NEW |