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

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

Issue 17494005: linux_aura: Three fixes for switching themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to tot Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 var RepeatingButton = cr.ui.RepeatingButton; 8 var RepeatingButton = cr.ui.RepeatingButton;
9 9
10 // 10 //
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 OptionsPage.navigateToPage('accounts'); 228 OptionsPage.navigateToPage('accounts');
229 chrome.send('coreOptionsUserMetricsAction', 229 chrome.send('coreOptionsUserMetricsAction',
230 ['Options_ManageAccounts']); 230 ['Options_ManageAccounts']);
231 }; 231 };
232 } else { 232 } else {
233 $('import-data').onclick = function(event) { 233 $('import-data').onclick = function(event) {
234 ImportDataOverlay.show(); 234 ImportDataOverlay.show();
235 chrome.send('coreOptionsUserMetricsAction', ['Import_ShowDlg']); 235 chrome.send('coreOptionsUserMetricsAction', ['Import_ShowDlg']);
236 }; 236 };
237 237
238 if ($('themes-GTK-button')) { 238 if ($('themes-native-button')) {
239 $('themes-GTK-button').onclick = function(event) { 239 $('themes-native-button').onclick = function(event) {
240 chrome.send('themesSetGTK'); 240 chrome.send('themesSetNative');
241 }; 241 };
242 } 242 }
243 } 243 }
244 244
245 // Default browser section. 245 // Default browser section.
246 if (!cr.isChromeOS) { 246 if (!cr.isChromeOS) {
247 $('set-as-default-browser').onclick = function(event) { 247 $('set-as-default-browser').onclick = function(event) {
248 chrome.send('becomeDefaultBrowser'); 248 chrome.send('becomeDefaultBrowser');
249 }; 249 };
250 250
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { 1107 for (var i = 0; i < $('profiles-list').dataModel.length; i++) {
1108 var profile = $('profiles-list').dataModel.item(i); 1108 var profile = $('profiles-list').dataModel.item(i);
1109 if (profile.isCurrentProfile) 1109 if (profile.isCurrentProfile)
1110 return profile; 1110 return profile;
1111 } 1111 }
1112 1112
1113 assert(false, 1113 assert(false,
1114 'There should always be a current profile, but none found.'); 1114 'There should always be a current profile, but none found.');
1115 }, 1115 },
1116 1116
1117 setGtkThemeButtonEnabled_: function(enabled) { 1117 setNativeThemeButtonEnabled_: function(enabled) {
1118 if (!cr.isChromeOS && navigator.platform.match(/linux|BSD/i)) 1118 var button = $('themes-native-button');
1119 $('themes-GTK-button').disabled = !enabled; 1119 if (button)
1120 button.disabled = !enabled;
1120 }, 1121 },
1121 1122
1122 setThemesResetButtonEnabled_: function(enabled) { 1123 setThemesResetButtonEnabled_: function(enabled) {
1123 $('themes-reset').disabled = !enabled; 1124 $('themes-reset').disabled = !enabled;
1124 }, 1125 },
1125 1126
1126 /** 1127 /**
1127 * (Re)loads IMG element with current user account picture. 1128 * (Re)loads IMG element with current user account picture.
1128 * @private 1129 * @private
1129 */ 1130 */
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 'getCurrentProfile', 1459 'getCurrentProfile',
1459 'getStartStopSyncButton', 1460 'getStartStopSyncButton',
1460 'hideBluetoothSettings', 1461 'hideBluetoothSettings',
1461 'notifyInitializationComplete', 1462 'notifyInitializationComplete',
1462 'removeBluetoothDevice', 1463 'removeBluetoothDevice',
1463 'removeCloudPrintConnectorSection', 1464 'removeCloudPrintConnectorSection',
1464 'scrollToSection', 1465 'scrollToSection',
1465 'setAutoOpenFileTypesDisplayed', 1466 'setAutoOpenFileTypesDisplayed',
1466 'setBluetoothState', 1467 'setBluetoothState',
1467 'setFontSize', 1468 'setFontSize',
1468 'setGtkThemeButtonEnabled', 1469 'setNativeThemeButtonEnabled',
1469 'setHighContrastCheckboxState', 1470 'setHighContrastCheckboxState',
1470 'setMetricsReportingCheckboxState', 1471 'setMetricsReportingCheckboxState',
1471 'setMetricsReportingSettingVisibility', 1472 'setMetricsReportingSettingVisibility',
1472 'setPasswordGenerationSettingVisibility', 1473 'setPasswordGenerationSettingVisibility',
1473 'setProfilesInfo', 1474 'setProfilesInfo',
1474 'setSpokenFeedbackCheckboxState', 1475 'setSpokenFeedbackCheckboxState',
1475 'setThemesResetButtonEnabled', 1476 'setThemesResetButtonEnabled',
1476 'setVirtualKeyboardCheckboxState', 1477 'setVirtualKeyboardCheckboxState',
1477 'setupCloudPrintConnectorSection', 1478 'setupCloudPrintConnectorSection',
1478 'setupPageZoomSelector', 1479 'setupPageZoomSelector',
(...skipping 27 matching lines...) Expand all
1506 BrowserOptions.getLoggedInUsername = function() { 1507 BrowserOptions.getLoggedInUsername = function() {
1507 return BrowserOptions.getInstance().username_; 1508 return BrowserOptions.getInstance().username_;
1508 }; 1509 };
1509 } 1510 }
1510 1511
1511 // Export 1512 // Export
1512 return { 1513 return {
1513 BrowserOptions: BrowserOptions 1514 BrowserOptions: BrowserOptions
1514 }; 1515 };
1515 }); 1516 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698