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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 }, | 259 }, |
260 | 260 |
261 /** | 261 /** |
262 * Sets the current size of the virtual keyboard. | 262 * Sets the current size of the virtual keyboard. |
263 * @param {number} width keyboard width | 263 * @param {number} width keyboard width |
264 * @param {number} height keyboard height | 264 * @param {number} height keyboard height |
265 */ | 265 */ |
266 setVirtualKeyboardSize: function(width, height) { | 266 setVirtualKeyboardSize: function(width, height) { |
267 this.virtualKeyboardWidth_ = width; | 267 this.virtualKeyboardWidth_ = width; |
268 this.virtualKeyboardHeight_ = height; | 268 this.virtualKeyboardHeight_ = height; |
269 | |
270 // Special case for screen lock. http://crbug.com/377904 | |
271 // In case of virtual keyboard adjuct work area. | |
272 if (this.displayType == DISPLAY_TYPE.LOCK) { | |
273 var bottom = (height) ? height : $('login-header-bar').offsetHeight; | |
274 var clientArea = $('outer-container'); | |
275 clientArea.style.bottom = cr.ui.toCssPx(bottom); | |
276 } | |
277 }, | 269 }, |
278 | 270 |
279 /** | 271 /** |
280 * Sets the current size of the client area (display size). | 272 * Sets the current size of the client area (display size). |
281 * @param {number} width client area width | 273 * @param {number} width client area width |
282 * @param {number} height client area height | 274 * @param {number} height client area height |
283 */ | 275 */ |
284 setClientAreaSize: function(width, height) { | 276 setClientAreaSize: function(width, height) { |
285 var clientArea = $('outer-container'); | 277 var clientArea = $('outer-container'); |
286 var bottom = parseInt(window.getComputedStyle(clientArea).bottom); | 278 var bottom = parseInt(window.getComputedStyle(clientArea).bottom); |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 */ | 1020 */ |
1029 DisplayManager.refocusCurrentPod = function() { | 1021 DisplayManager.refocusCurrentPod = function() { |
1030 $('pod-row').refocusCurrentPod(); | 1022 $('pod-row').refocusCurrentPod(); |
1031 }; | 1023 }; |
1032 | 1024 |
1033 // Export | 1025 // Export |
1034 return { | 1026 return { |
1035 DisplayManager: DisplayManager | 1027 DisplayManager: DisplayManager |
1036 }; | 1028 }; |
1037 }); | 1029 }); |
OLD | NEW |