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']); |
42 }; | 44 }; |
43 if (!cr.isChromeOS) { | 45 if (!cr.isChromeOS) { |
44 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { | 46 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { |
45 chrome.send('becomeDefaultBrowser'); | 47 chrome.send('becomeDefaultBrowser'); |
46 }; | 48 }; |
47 } | 49 } |
48 | 50 |
49 var list = $('startupPages'); | 51 var list = $('startupPages'); |
50 options.browser_options.StartupPageList.decorate(list); | 52 options.browser_options.StartupPageList.decorate(list); |
51 list.selectionModel = new ListSelectionModel; | 53 list.selectionModel = new ListSelectionModel; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 BrowserOptions.getInstance().addStartupPage_(url); | 227 BrowserOptions.getInstance().addStartupPage_(url); |
226 }; | 228 }; |
227 | 229 |
228 // Export | 230 // Export |
229 return { | 231 return { |
230 BrowserOptions: BrowserOptions | 232 BrowserOptions: BrowserOptions |
231 }; | 233 }; |
232 | 234 |
233 }); | 235 }); |
234 | 236 |
OLD | NEW |