Index: chrome/browser/resources/managed_user_passphrase_dialog.js |
diff --git a/chrome/browser/resources/managed_user_passphrase_dialog.js b/chrome/browser/resources/managed_user_passphrase_dialog.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e74fedc55c35d5c781736959cdc7ba586e0d3ebd |
--- /dev/null |
+++ b/chrome/browser/resources/managed_user_passphrase_dialog.js |
@@ -0,0 +1,27 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+function load() { |
+ $('unlock-passphrase-button').onclick = function(event) { |
+ chrome.send('checkPassphrase', [$('passphrase-entry').value]); |
+ }; |
+ $('cancel-passphrase-button').onclick = function(event) { |
+ chrome.send('DialogClose'); |
+ }; |
+ $('passphrase-entry').oninput = function(event) { |
+ $('unlock-passphrase-button').disabled = $('passphrase-entry').value == ''; |
+ $('incorrect-passphrase-warning').hidden = true; |
+ }; |
+} |
+ |
+function passphraseCorrect() { |
+ chrome.send('DialogClose', ['true']); |
+} |
+ |
+function passphraseIncorrect() { |
+ $('incorrect-passphrase-warning').hidden = false; |
+ $('passphrase-entry').focus(); |
+} |
+ |
+window.addEventListener('DOMContentLoaded', load); |