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 // | 5 // |
6 // BrowserOptions class | 6 // BrowserOptions class |
7 // Encapsulated handling of browser options page. | 7 // Encapsulated handling of browser options page. |
8 // | 8 // |
9 function BrowserOptions() { | 9 function BrowserOptions() { |
10 OptionsPage.call(this, 'browser', templateData.browserPage, 'browserPage'); | 10 OptionsPage.call(this, 'browser', templateData.browserPage, 'browserPage'); |
(...skipping 16 matching lines...) Expand all Loading... |
27 $('startupAddButton').onclick = function(event) { | 27 $('startupAddButton').onclick = function(event) { |
28 OptionsPage.showOverlay('addStartupPageOverlay'); | 28 OptionsPage.showOverlay('addStartupPageOverlay'); |
29 }; | 29 }; |
30 $('startupRemoveButton').onclick = function(event) { | 30 $('startupRemoveButton').onclick = function(event) { |
31 // TODO(stuartmorgan): Remove selected element(s). | 31 // TODO(stuartmorgan): Remove selected element(s). |
32 }; | 32 }; |
33 $('startupUseCurrentButton').onclick = function(event) { | 33 $('startupUseCurrentButton').onclick = function(event) { |
34 // TODO(stuartmorgan): Add all open tabs (except this one). | 34 // TODO(stuartmorgan): Add all open tabs (except this one). |
35 }; | 35 }; |
36 $('defaultSearchManageEnginesButton').onclick = function(event) { | 36 $('defaultSearchManageEnginesButton').onclick = function(event) { |
37 // TODO(stuartmorgan): Spawn search engine management sub-dialog. | 37 OptionsPage.showPageByName('searchEngines'); |
38 }; | 38 }; |
39 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { | 39 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { |
40 chrome.send('becomeDefaultBrowser'); | 40 chrome.send('becomeDefaultBrowser'); |
41 }; | 41 }; |
42 | 42 |
43 // Remove Windows-style accelerators from button labels. | 43 // Remove Windows-style accelerators from button labels. |
44 // TODO(stuartmorgan): Remove this once the strings are updated. | 44 // TODO(stuartmorgan): Remove this once the strings are updated. |
45 $('startupAddButton').textContent = | 45 $('startupAddButton').textContent = |
46 localStrings.getStringWithoutAccelerator('startupAddButton'); | 46 localStrings.getStringWithoutAccelerator('startupAddButton'); |
47 $('startupRemoveButton').textContent = | 47 $('startupRemoveButton').textContent = |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 }; | 108 }; |
109 | 109 |
110 BrowserOptions.updateDefaultBrowserState = function(statusString, isDefault) { | 110 BrowserOptions.updateDefaultBrowserState = function(statusString, isDefault) { |
111 BrowserOptions.getInstance().updateDefaultBrowserState_(statusString, | 111 BrowserOptions.getInstance().updateDefaultBrowserState_(statusString, |
112 isDefault); | 112 isDefault); |
113 } | 113 } |
114 | 114 |
115 BrowserOptions.updateSearchEngines = function(engines, defaultValue) { | 115 BrowserOptions.updateSearchEngines = function(engines, defaultValue) { |
116 BrowserOptions.getInstance().updateSearchEngines_(engines, defaultValue); | 116 BrowserOptions.getInstance().updateSearchEngines_(engines, defaultValue); |
117 } | 117 } |
OLD | NEW |