| 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 Polymer({ | 5 Polymer({ |
| 6 is: 'viewer-password-screen', | 6 is: 'viewer-password-screen', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 invalid: Boolean, | 9 invalid: Boolean, |
| 10 | 10 |
| 11 active: { | 11 active: { |
| 12 type: Boolean, | 12 type: Boolean, |
| 13 value: false, | 13 value: false, |
| 14 observer: 'activeChanged' | 14 observer: 'activeChanged' |
| 15 } | 15 }, |
| 16 |
| 17 strings: Object, |
| 16 }, | 18 }, |
| 17 | 19 |
| 18 ready: function() { | 20 ready: function() { |
| 19 this.activeChanged(); | 21 this.activeChanged(); |
| 20 }, | 22 }, |
| 21 | 23 |
| 22 accept: function() { | 24 accept: function() { |
| 23 this.active = false; | 25 this.active = false; |
| 24 }, | 26 }, |
| 25 | 27 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 46 | 48 |
| 47 activeChanged: function() { | 49 activeChanged: function() { |
| 48 if (this.active) { | 50 if (this.active) { |
| 49 this.$.dialog.open(); | 51 this.$.dialog.open(); |
| 50 this.$.password.focus(); | 52 this.$.password.focus(); |
| 51 } else { | 53 } else { |
| 52 this.$.dialog.close(); | 54 this.$.dialog.close(); |
| 53 } | 55 } |
| 54 } | 56 } |
| 55 }); | 57 }); |
| OLD | NEW |