| 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 21 matching lines...) Expand all Loading... |
| 32 $('startupAddButton').onclick = function(event) { | 32 $('startupAddButton').onclick = function(event) { |
| 33 OptionsPage.showOverlay('addStartupPageOverlay'); | 33 OptionsPage.showOverlay('addStartupPageOverlay'); |
| 34 }; | 34 }; |
| 35 $('startupRemoveButton').onclick = cr.bind( | 35 $('startupRemoveButton').onclick = cr.bind( |
| 36 this.removeSelectedStartupPages_, this); | 36 this.removeSelectedStartupPages_, this); |
| 37 $('startupUseCurrentButton').onclick = function(event) { | 37 $('startupUseCurrentButton').onclick = function(event) { |
| 38 chrome.send('setStartupPagesToCurrentPages'); | 38 chrome.send('setStartupPagesToCurrentPages'); |
| 39 }; | 39 }; |
| 40 $('defaultSearchManageEnginesButton').onclick = function(event) { | 40 $('defaultSearchManageEnginesButton').onclick = function(event) { |
| 41 OptionsPage.showPageByName('searchEngines'); | 41 OptionsPage.showPageByName('searchEngines'); |
| 42 chrome.send('coreOptionsUserMetricsAction', | |
| 43 ['Options_ManageSearchEngines']); | |
| 44 }; | 42 }; |
| 45 if (!cr.isChromeOS) { | 43 if (!cr.isChromeOS) { |
| 46 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { | 44 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { |
| 47 chrome.send('becomeDefaultBrowser'); | 45 chrome.send('becomeDefaultBrowser'); |
| 48 }; | 46 }; |
| 49 } | 47 } |
| 50 | 48 |
| 51 var list = $('startupPages'); | 49 var list = $('startupPages'); |
| 52 options.browser_options.StartupPageList.decorate(list); | 50 options.browser_options.StartupPageList.decorate(list); |
| 53 list.selectionModel = new ListSelectionModel; | 51 list.selectionModel = new ListSelectionModel; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 BrowserOptions.getInstance().addStartupPage_(url); | 225 BrowserOptions.getInstance().addStartupPage_(url); |
| 228 }; | 226 }; |
| 229 | 227 |
| 230 // Export | 228 // Export |
| 231 return { | 229 return { |
| 232 BrowserOptions: BrowserOptions | 230 BrowserOptions: BrowserOptions |
| 233 }; | 231 }; |
| 234 | 232 |
| 235 }); | 233 }); |
| 236 | 234 |
| OLD | NEW |