Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(943)

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 2888025: Strip & accelerator markers from buttons on the Basics DOMUI pref page (Closed)
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 //
csilv 2010/07/20 21:50:37 nit/suggestion: change this comment to JSDoc style
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');
11 } 11 }
12 12
13 cr.addSingletonGetter(BrowserOptions); 13 cr.addSingletonGetter(BrowserOptions);
14 14
15 BrowserOptions.prototype = { 15 BrowserOptions.prototype = {
(...skipping 16 matching lines...) Expand all
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 // TODO(stuartmorgan): Spawn search engine management sub-dialog.
38 }; 38 };
39 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { 39 $('defaultBrowserUseAsDefaultButton').onclick = function(event) {
40 chrome.send('becomeDefaultBrowser'); 40 chrome.send('becomeDefaultBrowser');
41 }; 41 };
42
43 // Remove Windows-style accelerators from button labels.
44 // TODO(stuartmorgan): Remove this once the strings are updated.
45 $('startupAddButton').textContent =
46 localStrings.getStringWithoutAccelerator('startupAddButton');
47 $('startupRemoveButton').textContent =
48 localStrings.getStringWithoutAccelerator('startupRemoveButton');
42 }, 49 },
43 50
44 /** 51 /**
45 * Update the Default Browsers section based on the current state. 52 * Update the Default Browsers section based on the current state.
46 * @param {String} statusString Description of the current default state. 53 * @param {String} statusString Description of the current default state.
47 * @param {Boolean} isDefault Whether or not the browser is currently default. 54 * @param {Boolean} isDefault Whether or not the browser is currently default.
48 */ 55 */
49 updateDefaultBrowserState_: function(statusString, isDefault) { 56 updateDefaultBrowserState_: function(statusString, isDefault) {
50 var label = $('defaultBrowserState'); 57 var label = $('defaultBrowserState');
51 label.textContent = statusString; 58 label.textContent = statusString;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 }; 108 };
102 109
103 BrowserOptions.updateDefaultBrowserState = function(statusString, isDefault) { 110 BrowserOptions.updateDefaultBrowserState = function(statusString, isDefault) {
104 BrowserOptions.getInstance().updateDefaultBrowserState_(statusString, 111 BrowserOptions.getInstance().updateDefaultBrowserState_(statusString,
105 isDefault); 112 isDefault);
106 } 113 }
107 114
108 BrowserOptions.updateSearchEngines = function(engines, defaultValue) { 115 BrowserOptions.updateSearchEngines = function(engines, defaultValue) {
109 BrowserOptions.getInstance().updateSearchEngines_(engines, defaultValue); 116 BrowserOptions.getInstance().updateSearchEngines_(engines, defaultValue);
110 } 117 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698