OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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 cr.define('options', function() { |
| 6 |
| 7 var OptionsPage = options.OptionsPage; |
| 8 |
| 9 /** |
| 10 * PasswordsRemoveAllOverlay class |
| 11 * Encapsulated handling of the 'Remove All' overlay page. |
| 12 * @class |
| 13 */ |
| 14 function PasswordsRemoveAllOverlay() { |
| 15 OptionsPage.call(this, 'passwordsRemoveAllOverlay', |
| 16 templateData.remove_all_title, |
| 17 'passwordsRemoveAllOverlay'); |
| 18 } |
| 19 |
| 20 cr.addSingletonGetter(PasswordsRemoveAllOverlay); |
| 21 |
| 22 PasswordsRemoveAllOverlay.prototype = { |
| 23 // Inherit StopSyncingOverlay from OptionsPage. |
| 24 __proto__: OptionsPage.prototype, |
| 25 |
| 26 /** |
| 27 * Initialize the page. |
| 28 */ |
| 29 initializePage: function() { |
| 30 // Call base class implementation to starts preference initialization. |
| 31 OptionsPage.prototype.initializePage.call(this); |
| 32 |
| 33 $('remove-all-cancel').onclick = function(e) { |
| 34 OptionsPage.clearOverlays(); |
| 35 } |
| 36 |
| 37 $('remove-all-confirm').onclick = function(e) { |
| 38 PasswordsExceptions.removeAllPasswords(); |
| 39 OptionsPage.clearOverlays(); |
| 40 } |
| 41 } |
| 42 }; |
| 43 |
| 44 // Export |
| 45 return { |
| 46 PasswordsRemoveAllOverlay: PasswordsRemoveAllOverlay |
| 47 }; |
| 48 |
| 49 }); |
| 50 |
OLD | NEW |