Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * This class implements the functionality that is specific to desktop | 7 * This class implements the functionality that is specific to desktop |
| 8 * remoting ("Chromoting" or CRD). | 8 * remoting ("Chromoting" or CRD). |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 * @return {void} Nothing. | 62 * @return {void} Nothing. |
| 63 */ | 63 */ |
| 64 remoting.DesktopRemoting.prototype.init = function() { | 64 remoting.DesktopRemoting.prototype.init = function() { |
| 65 remoting.initGlobalObjects(); | 65 remoting.initGlobalObjects(); |
| 66 remoting.initIdentity(remoting.onUserInfoAvailable); | 66 remoting.initIdentity(remoting.onUserInfoAvailable); |
| 67 | 67 |
| 68 remoting.initElementEventHandlers(); | 68 remoting.initElementEventHandlers(); |
| 69 remoting.initGlobalEventHandlers(); | 69 remoting.initGlobalEventHandlers(); |
| 70 | 70 |
| 71 if (base.isAppsV2()) { | 71 if (base.isAppsV2()) { |
| 72 remoting.fullscreen = new remoting.FullscreenAppsV2(); | |
| 73 remoting.windowFrame = new remoting.WindowFrame( | 72 remoting.windowFrame = new remoting.WindowFrame( |
| 74 document.getElementById('title-bar')); | 73 document.getElementById('title-bar')); |
| 75 remoting.optionsMenu = remoting.windowFrame.createOptionsMenu(); | 74 remoting.optionsMenu = remoting.windowFrame.createOptionsMenu(); |
| 75 | |
| 76 remoting.fullscreen = new remoting.FullscreenAppsV2(); | |
|
Jamie
2015/01/23 22:37:24
Moving this here feels cleaner because it allows t
| |
| 77 remoting.fullscreen.addListener(function(isFullscreen) { | |
| 78 chrome.storage.local.set({'start-fullscreen': isFullscreen}); | |
| 79 }); | |
| 80 // When a window goes full-screen, a resize event is triggered, but the | |
| 81 // Fullscreen.isActive call is not guaranteed to return true until the | |
| 82 // full-screen event is triggered. In apps v2, the size of the window's | |
| 83 // client area is calculated differently in full-screen mode, so register | |
| 84 // for both events. | |
| 85 remoting.fullscreen.addListener(remoting.onResize); | |
| 86 | |
| 76 } else { | 87 } else { |
| 77 remoting.fullscreen = new remoting.FullscreenAppsV1(); | 88 remoting.fullscreen = new remoting.FullscreenAppsV1(); |
| 78 remoting.toolbar = new remoting.Toolbar( | 89 remoting.toolbar = new remoting.Toolbar( |
| 79 document.getElementById('session-toolbar')); | 90 document.getElementById('session-toolbar')); |
| 80 remoting.optionsMenu = remoting.toolbar.createOptionsMenu(); | 91 remoting.optionsMenu = remoting.toolbar.createOptionsMenu(); |
| 81 } | 92 } |
| 82 | 93 |
| 83 remoting.initHostlist_(); | 94 remoting.initHostlist_(); |
| 84 | 95 |
| 85 var homeFeedback = new remoting.MenuButton( | 96 var homeFeedback = new remoting.MenuButton( |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 if (mode == remoting.ClientSession.Mode.IT2ME) { | 301 if (mode == remoting.ClientSession.Mode.IT2ME) { |
| 291 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME); | 302 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME); |
| 292 remoting.hangoutSessionEvents.raiseEvent( | 303 remoting.hangoutSessionEvents.raiseEvent( |
| 293 remoting.hangoutSessionEvents.sessionStateChanged, | 304 remoting.hangoutSessionEvents.sessionStateChanged, |
| 294 remoting.ClientSession.State.FAILED | 305 remoting.ClientSession.State.FAILED |
| 295 ); | 306 ); |
| 296 } else { | 307 } else { |
| 297 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); | 308 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); |
| 298 } | 309 } |
| 299 }; | 310 }; |
| OLD | NEW |