| 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 * @param {!HTMLElement} screen Screen that is being shown. | 699 * @param {!HTMLElement} screen Screen that is being shown. |
| 700 */ | 700 */ |
| 701 updateScreenSize: function(screen) { | 701 updateScreenSize: function(screen) { |
| 702 // Have to reset any previously predefined screen size first | 702 // Have to reset any previously predefined screen size first |
| 703 // so that screen contents would define it instead. | 703 // so that screen contents would define it instead. |
| 704 $('inner-container').style.height = ''; | 704 $('inner-container').style.height = ''; |
| 705 $('inner-container').style.width = ''; | 705 $('inner-container').style.width = ''; |
| 706 screen.style.width = ''; | 706 screen.style.width = ''; |
| 707 screen.style.height = ''; | 707 screen.style.height = ''; |
| 708 | 708 |
| 709 $('outer-container').classList.toggle( | 709 $('outer-container').classList.toggle( |
| 710 'fullscreen', screen.classList.contains('fullscreen')); | 710 'fullscreen', screen.classList.contains('fullscreen')); |
| 711 | 711 |
| 712 var width = screen.getPreferredSize().width; | 712 var width = screen.getPreferredSize().width; |
| 713 var height = screen.getPreferredSize().height; | 713 var height = screen.getPreferredSize().height; |
| 714 for (var i = 0, screenGroup; screenGroup = SCREEN_GROUPS[i]; i++) { | 714 for (var i = 0, screenGroup; screenGroup = SCREEN_GROUPS[i]; i++) { |
| 715 if (screenGroup.indexOf(screen.id) != -1) { | 715 if (screenGroup.indexOf(screen.id) != -1) { |
| 716 // Set screen dimensions to maximum dimensions within this group. | 716 // Set screen dimensions to maximum dimensions within this group. |
| 717 for (var j = 0, screen2; screen2 = $(screenGroup[j]); j++) { | 717 for (var j = 0, screen2; screen2 = $(screenGroup[j]); j++) { |
| 718 width = Math.max(width, screen2.getPreferredSize().width); | 718 width = Math.max(width, screen2.getPreferredSize().width); |
| 719 height = Math.max(height, screen2.getPreferredSize().height); | 719 height = Math.max(height, screen2.getPreferredSize().height); |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 */ | 1074 */ |
| 1075 DisplayManager.refocusCurrentPod = function() { | 1075 DisplayManager.refocusCurrentPod = function() { |
| 1076 $('pod-row').refocusCurrentPod(); | 1076 $('pod-row').refocusCurrentPod(); |
| 1077 }; | 1077 }; |
| 1078 | 1078 |
| 1079 // Export | 1079 // Export |
| 1080 return { | 1080 return { |
| 1081 DisplayManager: DisplayManager | 1081 DisplayManager: DisplayManager |
| 1082 }; | 1082 }; |
| 1083 }); | 1083 }); |
| OLD | NEW |