| 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 Display manager for WebUI OOBE and login. | 6 * @fileoverview Display manager for WebUI OOBE and login. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 // TODO(xiyuan): Find a better to share those constants. | 9 // TODO(xiyuan): Find a better to share those constants. |
| 10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect'; | 10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect'; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 */ | 166 */ |
| 167 allowToggleVersion_: false, | 167 allowToggleVersion_: false, |
| 168 | 168 |
| 169 /** | 169 /** |
| 170 * Whether keyboard navigation flow is enforced. | 170 * Whether keyboard navigation flow is enforced. |
| 171 * @type {boolean} | 171 * @type {boolean} |
| 172 */ | 172 */ |
| 173 forceKeyboardFlow_: false, | 173 forceKeyboardFlow_: false, |
| 174 | 174 |
| 175 /** | 175 /** |
| 176 * Whether virtual keyboard is shown. |
| 177 * @type {boolean} |
| 178 */ |
| 179 virtualKeyboardShown_: false, |
| 180 |
| 181 /** |
| 176 * Type of UI. | 182 * Type of UI. |
| 177 * @type {string} | 183 * @type {string} |
| 178 */ | 184 */ |
| 179 displayType_: DISPLAY_TYPE.UNKNOWN, | 185 displayType_: DISPLAY_TYPE.UNKNOWN, |
| 180 | 186 |
| 181 /** | 187 /** |
| 182 * Error message (bubble) was shown. This is checked in tests. | 188 * Error message (bubble) was shown. This is checked in tests. |
| 183 */ | 189 */ |
| 184 errorMessageWasShownForTesting_: false, | 190 errorMessageWasShownForTesting_: false, |
| 185 | 191 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 */ | 225 */ |
| 220 get headerHidden() { | 226 get headerHidden() { |
| 221 return $('login-header-bar').hidden; | 227 return $('login-header-bar').hidden; |
| 222 }, | 228 }, |
| 223 | 229 |
| 224 set headerHidden(hidden) { | 230 set headerHidden(hidden) { |
| 225 $('login-header-bar').hidden = hidden; | 231 $('login-header-bar').hidden = hidden; |
| 226 }, | 232 }, |
| 227 | 233 |
| 228 /** | 234 /** |
| 235 * Virtual keyboard state (hidden/shown). |
| 236 * @param {boolean} hidden Whether keyboard is shown. |
| 237 */ |
| 238 get virtualKeyboardShown() { |
| 239 return this.virtualKeyboardShown_; |
| 240 }, |
| 241 |
| 242 set virtualKeyboardShown(shown) { |
| 243 this.virtualKeyboardShown_ = shown; |
| 244 }, |
| 245 |
| 246 /** |
| 247 * Sets the current size of the client area (display size). |
| 248 * @param {number} width client area width |
| 249 * @param {number} height client area height |
| 250 */ |
| 251 setClientAreaSize: function(width, height) { |
| 252 var clientArea = $('outer-container'); |
| 253 var bottom = parseInt(window.getComputedStyle(clientArea).bottom); |
| 254 clientArea.style.minHeight = (height - bottom) + 'px'; |
| 255 }, |
| 256 |
| 257 /** |
| 229 * Toggles background of main body between transparency and solid. | 258 * Toggles background of main body between transparency and solid. |
| 230 * @param {boolean} solid Whether to show a solid background. | 259 * @param {boolean} solid Whether to show a solid background. |
| 231 */ | 260 */ |
| 232 set solidBackground(solid) { | 261 set solidBackground(solid) { |
| 233 if (solid) | 262 if (solid) |
| 234 document.body.classList.add('solid'); | 263 document.body.classList.add('solid'); |
| 235 else | 264 else |
| 236 document.body.classList.remove('solid'); | 265 document.body.classList.remove('solid'); |
| 237 }, | 266 }, |
| 238 | 267 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 */ | 995 */ |
| 967 DisplayManager.refocusCurrentPod = function() { | 996 DisplayManager.refocusCurrentPod = function() { |
| 968 $('pod-row').refocusCurrentPod(); | 997 $('pod-row').refocusCurrentPod(); |
| 969 }; | 998 }; |
| 970 | 999 |
| 971 // Export | 1000 // Export |
| 972 return { | 1001 return { |
| 973 DisplayManager: DisplayManager | 1002 DisplayManager: DisplayManager |
| 974 }; | 1003 }; |
| 975 }); | 1004 }); |
| OLD | NEW |