| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 Out of the box experience flow (OOBE). | 6 * @fileoverview Out of the box experience flow (OOBE). |
| 7 * This is the main code for the OOBE WebUI implementation. | 7 * This is the main code for the OOBE WebUI implementation. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 <include src="login_common.js"></include> | 10 <include src="login_common.js"></include> |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 /** | 140 /** |
| 141 * Accessibility link handler. | 141 * Accessibility link handler. |
| 142 */ | 142 */ |
| 143 handleAccessibilityLinkClick: function(e) { | 143 handleAccessibilityLinkClick: function(e) { |
| 144 /** @const */ var BUBBLE_OFFSET = 5; | 144 /** @const */ var BUBBLE_OFFSET = 5; |
| 145 /** @const */ var BUBBLE_PADDING = 10; | 145 /** @const */ var BUBBLE_PADDING = 10; |
| 146 $('accessibility-menu').showForElement(e.target, | 146 $('accessibility-menu').showForElement(e.target, |
| 147 cr.ui.Bubble.Attachment.BOTTOM, | 147 cr.ui.Bubble.Attachment.BOTTOM, |
| 148 BUBBLE_OFFSET, BUBBLE_PADDING); | 148 BUBBLE_OFFSET, BUBBLE_PADDING); |
| 149 |
| 150 var maxHeight = Oobe.getMaxHeightBeforeShelfOverlapping( |
| 151 $('accessibility-menu')); |
| 152 if (maxHeight < |
| 153 parseInt(window.getComputedStyle($('accessibility-menu')).height)) { |
| 154 $('accessibility-menu').showForElement(e.target, |
| 155 cr.ui.Bubble.Attachment.TOP, |
| 156 BUBBLE_OFFSET, BUBBLE_PADDING); |
| 157 } |
| 158 |
| 149 $('accessibility-menu').firstBubbleElement = $('spoken-feedback'); | 159 $('accessibility-menu').firstBubbleElement = $('spoken-feedback'); |
| 150 $('accessibility-menu').lastBubbleElement = $('close-accessibility-menu'); | 160 $('accessibility-menu').lastBubbleElement = $('close-accessibility-menu'); |
| 151 if (Oobe.getInstance().currentScreen && | 161 if (Oobe.getInstance().currentScreen && |
| 152 Oobe.getInstance().currentScreen.defaultControl) { | 162 Oobe.getInstance().currentScreen.defaultControl) { |
| 153 $('accessibility-menu').elementToFocusOnHide = | 163 $('accessibility-menu').elementToFocusOnHide = |
| 154 Oobe.getInstance().currentScreen.defaultControl; | 164 Oobe.getInstance().currentScreen.defaultControl; |
| 155 } else { | 165 } else { |
| 156 // Update screen falls into this category. Since it doesn't have any | 166 // Update screen falls into this category. Since it doesn't have any |
| 157 // controls other than a11y link we don't want that link to receive | 167 // controls other than a11y link we don't want that link to receive |
| 158 // focus when screen is shown i.e. defaultControl is not defined. | 168 // focus when screen is shown i.e. defaultControl is not defined. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 /** | 283 /** |
| 274 * Updates localized content of the screens. | 284 * Updates localized content of the screens. |
| 275 * Should be executed on language change. | 285 * Should be executed on language change. |
| 276 */ | 286 */ |
| 277 updateLocalizedContent: function() { | 287 updateLocalizedContent: function() { |
| 278 // Buttons, headers and links. | 288 // Buttons, headers and links. |
| 279 Oobe.getInstance().updateLocalizedContent_(); | 289 Oobe.getInstance().updateLocalizedContent_(); |
| 280 } | 290 } |
| 281 }; | 291 }; |
| 282 }); | 292 }); |
| OLD | NEW |