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 20 matching lines...) Expand all Loading... |
31 }, | 31 }, |
32 | 32 |
33 /** | 33 /** |
34 * Switches styles to "Welcome screen". | 34 * Switches styles to "Welcome screen". |
35 */ | 35 */ |
36 welcomeScreen: { | 36 welcomeScreen: { |
37 type: Boolean, | 37 type: Boolean, |
38 value: false, | 38 value: false, |
39 reflectToAttribute: true, | 39 reflectToAttribute: true, |
40 }, | 40 }, |
| 41 |
| 42 android: { |
| 43 type: Boolean, |
| 44 value: false, |
| 45 }, |
41 }, | 46 }, |
42 | 47 |
43 focus: function() { | 48 focus: function() { |
44 /* When Network Selection Dialog is shown because user pressed "Back" | 49 /* When Network Selection Dialog is shown because user pressed "Back" |
45 button on EULA screen, display_manager does not inform this dialog that | 50 button on EULA screen, display_manager does not inform this dialog that |
46 it is shown. It ouly focuses this dialog. | 51 it is shown. It ouly focuses this dialog. |
47 So this emulates show(). | 52 So this emulates show(). |
48 TODO (alemate): fix this once event flow is updated. | 53 TODO (alemate): fix this once event flow is updated. |
49 */ | 54 */ |
50 this.show(); | 55 this.show(); |
51 }, | 56 }, |
52 | 57 |
53 /** | 58 /** |
54 * This is called from oobe_welcome when this dialog is shown. | 59 * This is called from oobe_welcome when this dialog is shown. |
55 */ | 60 */ |
56 show: function() { | 61 show: function() { |
57 var focusedElements = this.getElementsByClassName('focus-on-show'); | 62 var focusedElements = this.getElementsByClassName('focus-on-show'); |
58 if (focusedElements.length > 0) | 63 if (focusedElements.length > 0) |
59 focusedElements[0].focus(); | 64 focusedElements[0].focus(); |
60 | 65 |
61 this.fire('show-dialog'); | 66 this.fire('show-dialog'); |
62 }, | 67 }, |
63 }); | 68 }); |
OLD | NEW |