Chromium Code Reviews| 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..d624fe38adc2c3fb452fefadfffc1e7f0497f464 |
| --- /dev/null |
| +++ b/chrome/browser/resources/managed_user_passphrase_dialog.js |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2013 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'); |
|
James Hawkins
2013/02/12 18:57:16
nit: closeDialog
Adrian Kuegel
2013/02/13 10:53:36
Here I am using a function which is defined in chr
James Hawkins
2013/02/13 21:47:26
Personally I would rename it, but feel free to do
Adrian Kuegel
2013/02/14 10:36:12
Ok, then I will add a TODO and do it in a later CL
|
| + }; |
| + $('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); |