Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 const ArrayDataModel = cr.ui.ArrayDataModel; | 7 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 const ListSelectionModel = cr.ui.ListSelectionModel; | 8 const ListSelectionModel = cr.ui.ListSelectionModel; |
| 9 | 9 |
| 10 // | 10 // |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 $('instantEnableCheckbox').onclick = function(event) { | 55 $('instantEnableCheckbox').onclick = function(event) { |
| 56 var alreadyConfirmed = $('instantDialogShown').checked; | 56 var alreadyConfirmed = $('instantDialogShown').checked; |
| 57 | 57 |
| 58 if (this.checked && !alreadyConfirmed) { | 58 if (this.checked && !alreadyConfirmed) { |
| 59 // Leave disabled for now. The PrefCheckbox handler already set it to | 59 // Leave disabled for now. The PrefCheckbox handler already set it to |
| 60 // true so undo that. | 60 // true so undo that. |
| 61 Preferences.setBooleanPref(this.pref, false, this.metric); | 61 Preferences.setBooleanPref(this.pref, false, this.metric); |
| 62 OptionsPage.showOverlay('instantConfirmOverlay'); | 62 OptionsPage.showOverlay('instantConfirmOverlay'); |
| 63 } | 63 } |
| 64 }; | 64 }; |
| 65 $('defaultSearchEngine').onchange = this.setDefaultSearchEngine; | |
|
arv (Not doing code reviews)
2011/01/13 20:51:10
This looks a bit scary since we lose the 'this' po
| |
| 65 | 66 |
| 66 var homepageField = $('homepageURL'); | 67 var homepageField = $('homepageURL'); |
| 67 $('homepageUseNTPButton').onchange = | 68 $('homepageUseNTPButton').onchange = |
| 68 this.handleHomepageUseNTPButtonChange_.bind(this); | 69 this.handleHomepageUseNTPButtonChange_.bind(this); |
| 69 $('homepageUseURLButton').onchange = | 70 $('homepageUseURLButton').onchange = |
| 70 this.handleHomepageUseURLButtonChange_.bind(this); | 71 this.handleHomepageUseURLButtonChange_.bind(this); |
| 71 homepageField.onchange = | 72 homepageField.onchange = |
| 72 this.handleHomepageURLChange_.bind(this); | 73 this.handleHomepageURLChange_.bind(this); |
| 73 | 74 |
| 74 // Ensure that changes are committed when closing the page. | 75 // Ensure that changes are committed when closing the page. |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 BrowserOptions.getInstance().updateStartupPages_(pages); | 378 BrowserOptions.getInstance().updateStartupPages_(pages); |
| 378 StartupPageManager.getInstance().updateStartupPages_(pages); | 379 StartupPageManager.getInstance().updateStartupPages_(pages); |
| 379 }; | 380 }; |
| 380 | 381 |
| 381 // Export | 382 // Export |
| 382 return { | 383 return { |
| 383 BrowserOptions: BrowserOptions | 384 BrowserOptions: BrowserOptions |
| 384 }; | 385 }; |
| 385 | 386 |
| 386 }); | 387 }); |
| OLD | NEW |