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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 /* When Network Selection Dialog is shown because user pressed "Back" | 44 /* When Network Selection Dialog is shown because user pressed "Back" |
45 button on EULA screen, display_manager does not inform this dialog that | 45 button on EULA screen, display_manager does not inform this dialog that |
46 it is shown. It ouly focuses this dialog. | 46 it is shown. It ouly focuses this dialog. |
47 So this emulates show(). | 47 So this emulates show(). |
48 TODO (alemate): fix this once event flow is updated. | 48 TODO (alemate): fix this once event flow is updated. |
49 */ | 49 */ |
50 this.show(); | 50 this.show(); |
51 }, | 51 }, |
52 | 52 |
53 /** | 53 /** |
54 * This is called from oobe_welcome when this dialog is shown. | 54 * This is called from oobe_welcome when this dialog is shown. |
55 */ | 55 */ |
56 show: function() { | 56 show: function() { |
57 var focusedElements = this.getElementsByClassName('focus-on-show'); | 57 var focusedElements = this.getElementsByClassName('focus-on-show'); |
58 if (focusedElements.length > 0) | 58 if (focusedElements.length > 0) |
59 focusedElements[0].focus(); | 59 focusedElements[0].focus(); |
60 | 60 |
61 this.fire('show-dialog'); | 61 this.fire('show-dialog'); |
62 }, | 62 }, |
63 }); | 63 }); |
OLD | NEW |