Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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. | |
| 4 | |
| 5 function load() { | |
| 6 $('unlock-passphrase-button').onclick = function(event) { | |
| 7 chrome.send('checkPassphrase', [$('passphrase-entry').value]); | |
| 8 }; | |
| 9 $('cancel-passphrase-button').onclick = function(event) { | |
| 10 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
| |
| 11 }; | |
| 12 $('passphrase-entry').oninput = function(event) { | |
| 13 $('unlock-passphrase-button').disabled = $('passphrase-entry').value == ''; | |
| 14 $('incorrect-passphrase-warning').hidden = true; | |
| 15 }; | |
| 16 } | |
| 17 | |
| 18 function passphraseCorrect() { | |
| 19 chrome.send('DialogClose', ['true']); | |
| 20 } | |
| 21 | |
| 22 function passphraseIncorrect() { | |
| 23 $('incorrect-passphrase-warning').hidden = false; | |
| 24 $('passphrase-entry').focus(); | |
| 25 } | |
| 26 | |
| 27 window.addEventListener('DOMContentLoaded', load); | |
| OLD | NEW |