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
3 // found in the LICENSE file.
6 is
: 'viewer-password-screen',
11 value
: 'This document is password protected. Please enter a password.',
17 observer
: 'activeChanged'
30 this.$.password
.disabled
= false;
31 this.$.submit
.disabled
= false;
32 this.$['password-container'].invalid
= true;
33 this.$.password
.focus();
34 this.$.password
.select();
37 handleKey: function(e
) {
43 if (this.$.password
.value
.length
== 0)
45 this.$.password
.disabled
= true;
46 this.$.submit
.disabled
= true;
47 this.fire('password-submitted', {password
: this.$.password
.value
});
50 activeChanged: function() {
53 this.$.password
.focus();
55 this.$.dialog
.close();