| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 Polymer({ | 5 Polymer({ |
| 6 is: 'oobe-dialog', | 6 is: 'oobe-dialog', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 /** | 9 /** |
| 10 * Controls visibility of the bottom-buttons element. | 10 * Controls visibility of the bottom-buttons element. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 }, | 39 }, |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Switches styles to "Welcome screen". | 42 * Switches styles to "Welcome screen". |
| 43 */ | 43 */ |
| 44 welcomeScreen: { | 44 welcomeScreen: { |
| 45 type: Boolean, | 45 type: Boolean, |
| 46 value: false, | 46 value: false, |
| 47 reflectToAttribute: true, | 47 reflectToAttribute: true, |
| 48 }, | 48 }, |
| 49 |
| 50 android: { |
| 51 type: Boolean, |
| 52 value: false, |
| 53 }, |
| 49 }, | 54 }, |
| 50 | 55 |
| 51 focus: function() { | 56 focus: function() { |
| 52 /* When Network Selection Dialog is shown because user pressed "Back" | 57 /* When Network Selection Dialog is shown because user pressed "Back" |
| 53 button on EULA screen, display_manager does not inform this dialog that | 58 button on EULA screen, display_manager does not inform this dialog that |
| 54 it is shown. It ouly focuses this dialog. | 59 it is shown. It ouly focuses this dialog. |
| 55 So this emulates show(). | 60 So this emulates show(). |
| 56 TODO (alemate): fix this once event flow is updated. | 61 TODO (alemate): fix this once event flow is updated. |
| 57 */ | 62 */ |
| 58 this.show(); | 63 this.show(); |
| 59 }, | 64 }, |
| 60 | 65 |
| 61 /** | 66 /** |
| 62 * This is called from oobe_welcome when this dialog is shown. | 67 * This is called from oobe_welcome when this dialog is shown. |
| 63 */ | 68 */ |
| 64 show: function() { | 69 show: function() { |
| 65 var focusedElements = this.getElementsByClassName('focus-on-show'); | 70 var focusedElements = this.getElementsByClassName('focus-on-show'); |
| 66 if (focusedElements.length > 0) | 71 if (focusedElements.length > 0) |
| 67 focusedElements[0].focus(); | 72 focusedElements[0].focus(); |
| 68 | 73 |
| 69 this.fire('show-dialog'); | 74 this.fire('show-dialog'); |
| 70 }, | 75 }, |
| 71 }); | 76 }); |
| OLD | NEW |