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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 */ | 196 */ |
197 allowToggleVersion_: false, | 197 allowToggleVersion_: false, |
198 | 198 |
199 /** | 199 /** |
200 * Whether keyboard navigation flow is enforced. | 200 * Whether keyboard navigation flow is enforced. |
201 * @type {boolean} | 201 * @type {boolean} |
202 */ | 202 */ |
203 forceKeyboardFlow_: false, | 203 forceKeyboardFlow_: false, |
204 | 204 |
205 /** | 205 /** |
206 * Whether virtual keyboard is shown. | |
207 * @type {boolean} | |
208 */ | |
209 virtualKeyboardShown_: false, | |
210 | |
211 /** | |
212 * Virtual keyboard width. | |
213 * @type {number} | |
214 */ | |
215 virtualKeyboardWidth_: 0, | |
216 | |
217 /** | |
218 * Virtual keyboard height. | |
219 * @type {number} | |
220 */ | |
221 virtualKeyboardHeight_: 0, | |
222 | |
223 /** | |
224 * Type of UI. | 206 * Type of UI. |
225 * @type {string} | 207 * @type {string} |
226 */ | 208 */ |
227 displayType_: DISPLAY_TYPE.UNKNOWN, | 209 displayType_: DISPLAY_TYPE.UNKNOWN, |
228 | 210 |
229 /** | 211 /** |
230 * Error message (bubble) was shown. This is checked in tests. | 212 * Error message (bubble) was shown. This is checked in tests. |
231 */ | 213 */ |
232 errorMessageWasShownForTesting_: false, | 214 errorMessageWasShownForTesting_: false, |
233 | 215 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 */ | 249 */ |
268 get headerHidden() { | 250 get headerHidden() { |
269 return $('login-header-bar').hidden; | 251 return $('login-header-bar').hidden; |
270 }, | 252 }, |
271 | 253 |
272 set headerHidden(hidden) { | 254 set headerHidden(hidden) { |
273 $('login-header-bar').hidden = hidden; | 255 $('login-header-bar').hidden = hidden; |
274 }, | 256 }, |
275 | 257 |
276 /** | 258 /** |
277 * Virtual keyboard state (hidden/shown). | |
278 * @param {boolean} hidden Whether keyboard is shown. | |
279 */ | |
280 get virtualKeyboardShown() { | |
281 return this.virtualKeyboardShown_; | |
282 }, | |
283 | |
284 set virtualKeyboardShown(shown) { | |
285 this.virtualKeyboardShown_ = shown; | |
286 }, | |
287 | |
288 /** | |
289 * Sets the current size of the virtual keyboard. | |
290 * @param {number} width keyboard width | |
291 * @param {number} height keyboard height | |
292 */ | |
293 setVirtualKeyboardSize: function(width, height) { | |
294 this.virtualKeyboardWidth_ = width; | |
295 this.virtualKeyboardHeight_ = height; | |
296 }, | |
297 | |
298 /** | |
299 * Sets the current size of the client area (display size). | 259 * Sets the current size of the client area (display size). |
300 * @param {number} width client area width | 260 * @param {number} width client area width |
301 * @param {number} height client area height | 261 * @param {number} height client area height |
302 */ | 262 */ |
303 setClientAreaSize: function(width, height) { | 263 setClientAreaSize: function(width, height) { |
304 var clientArea = $('outer-container'); | 264 var clientArea = $('outer-container'); |
305 var bottom = parseInt(window.getComputedStyle(clientArea).bottom); | 265 var bottom = parseInt(window.getComputedStyle(clientArea).bottom); |
306 clientArea.style.minHeight = cr.ui.toCssPx(height - bottom); | 266 clientArea.style.minHeight = cr.ui.toCssPx(height - bottom); |
307 }, | 267 }, |
308 | 268 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 */ | 1047 */ |
1088 DisplayManager.refocusCurrentPod = function() { | 1048 DisplayManager.refocusCurrentPod = function() { |
1089 $('pod-row').refocusCurrentPod(); | 1049 $('pod-row').refocusCurrentPod(); |
1090 }; | 1050 }; |
1091 | 1051 |
1092 // Export | 1052 // Export |
1093 return { | 1053 return { |
1094 DisplayManager: DisplayManager | 1054 DisplayManager: DisplayManager |
1095 }; | 1055 }; |
1096 }); | 1056 }); |
OLD | NEW |