| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 var SettingsDialog = options.SettingsDialog; | 6 var SettingsDialog = options.SettingsDialog; |
| 7 | 7 |
| 8 /* | 8 /* |
| 9 * InstantConfirmOverlay class | 9 * InstantConfirmOverlay class |
| 10 * Dialog to confirm that the user really wants to enable Chrome Instant. | 10 * Dialog to confirm that the user really wants to enable Chrome Instant. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 __proto__: SettingsDialog.prototype, | 25 __proto__: SettingsDialog.prototype, |
| 26 | 26 |
| 27 /** @inheritDoc */ | 27 /** @inheritDoc */ |
| 28 initializePage: function() { | 28 initializePage: function() { |
| 29 SettingsDialog.prototype.initializePage.call(this); | 29 SettingsDialog.prototype.initializePage.call(this); |
| 30 }, | 30 }, |
| 31 | 31 |
| 32 /** @inheritDoc */ | 32 /** @inheritDoc */ |
| 33 handleConfirm: function() { | 33 handleConfirm: function() { |
| 34 SettingsDialog.prototype.handleConfirm.call(this); | 34 SettingsDialog.prototype.handleConfirm.call(this); |
| 35 chrome.send('enableInstant'); | 35 Preferences.setBooleanPref('instant.confirm_dialog_shown', true); |
| 36 Preferences.setBooleanPref('instant.enabled', true); |
| 36 }, | 37 }, |
| 37 | 38 |
| 38 /** @inheritDoc */ | 39 /** @inheritDoc */ |
| 39 handleCancel: function() { | 40 handleCancel: function() { |
| 40 SettingsDialog.prototype.handleCancel.call(this); | 41 SettingsDialog.prototype.handleCancel.call(this); |
| 41 $('instant-enabled-control').checked = false; | 42 $('instant-enabled-control').checked = false; |
| 42 }, | 43 }, |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 // Export | 46 // Export |
| 46 return { | 47 return { |
| 47 InstantConfirmOverlay: InstantConfirmOverlay | 48 InstantConfirmOverlay: InstantConfirmOverlay |
| 48 }; | 49 }; |
| 49 }); | 50 }); |
| OLD | NEW |