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