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

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

Issue 222913003: Add button to reset auto-open pref in Chrome OS settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change padding Created 6 years, 8 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
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | 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) 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 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator;
10 10
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 }; 431 };
432 $('language-button').onclick = showLanguageOptions; 432 $('language-button').onclick = showLanguageOptions;
433 $('manage-languages').onclick = showLanguageOptions; 433 $('manage-languages').onclick = showLanguageOptions;
434 434
435 // Downloads section. 435 // Downloads section.
436 Preferences.getInstance().addEventListener('download.default_directory', 436 Preferences.getInstance().addEventListener('download.default_directory',
437 this.onDefaultDownloadDirectoryChanged_.bind(this)); 437 this.onDefaultDownloadDirectoryChanged_.bind(this));
438 $('downloadLocationChangeButton').onclick = function(event) { 438 $('downloadLocationChangeButton').onclick = function(event) {
439 chrome.send('selectDownloadLocation'); 439 chrome.send('selectDownloadLocation');
440 }; 440 };
441 if (!cr.isChromeOS) { 441 if (cr.isChromeOS) {
442 $('autoOpenFileTypesResetToDefault').onclick = function(event) {
443 chrome.send('autoOpenFileTypesAction');
444 };
445 } else {
446 $('disable-drive-row').hidden = 442 $('disable-drive-row').hidden =
447 UIAccountTweaks.loggedInAsLocallyManagedUser(); 443 UIAccountTweaks.loggedInAsLocallyManagedUser();
448 } 444 }
445 $('autoOpenFileTypesResetToDefault').onclick = function(event) {
446 chrome.send('autoOpenFileTypesAction');
447 };
449 448
450 // HTTPS/SSL section. 449 // HTTPS/SSL section.
451 if (cr.isWindows || cr.isMac) { 450 if (cr.isWindows || cr.isMac) {
452 $('certificatesManageButton').onclick = function(event) { 451 $('certificatesManageButton').onclick = function(event) {
453 chrome.send('showManageSSLCertificates'); 452 chrome.send('showManageSSLCertificates');
454 }; 453 };
455 } else { 454 } else {
456 $('certificatesManageButton').onclick = function(event) { 455 $('certificatesManageButton').onclick = function(event) {
457 OptionsPage.navigateToPage('certificates'); 456 OptionsPage.navigateToPage('certificates');
458 chrome.send('coreOptionsUserMetricsAction', 457 chrome.send('coreOptionsUserMetricsAction',
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 } 1454 }
1456 }, 1455 },
1457 1456
1458 /** 1457 /**
1459 * Shows/hides the autoOpenFileTypesResetToDefault button and label, with 1458 * Shows/hides the autoOpenFileTypesResetToDefault button and label, with
1460 * animation. 1459 * animation.
1461 * @param {boolean} display Whether to show the button and label or not. 1460 * @param {boolean} display Whether to show the button and label or not.
1462 * @private 1461 * @private
1463 */ 1462 */
1464 setAutoOpenFileTypesDisplayed_: function(display) { 1463 setAutoOpenFileTypesDisplayed_: function(display) {
1465 if (cr.isChromeOS)
1466 return;
1467
1468 if ($('advanced-settings').hidden) { 1464 if ($('advanced-settings').hidden) {
1469 // If the Advanced section is hidden, don't animate the transition. 1465 // If the Advanced section is hidden, don't animate the transition.
1470 $('auto-open-file-types-section').hidden = !display; 1466 $('auto-open-file-types-section').hidden = !display;
1471 } else { 1467 } else {
1472 if (display) { 1468 if (display) {
1473 this.showSectionWithAnimation_( 1469 this.showSectionWithAnimation_(
1474 $('auto-open-file-types-section'), 1470 $('auto-open-file-types-section'),
1475 $('auto-open-file-types-container')); 1471 $('auto-open-file-types-container'));
1476 } else { 1472 } else {
1477 this.hideSectionWithAnimation_( 1473 this.hideSectionWithAnimation_(
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 BrowserOptions.getLoggedInUsername = function() { 1733 BrowserOptions.getLoggedInUsername = function() {
1738 return BrowserOptions.getInstance().username_; 1734 return BrowserOptions.getInstance().username_;
1739 }; 1735 };
1740 } 1736 }
1741 1737
1742 // Export 1738 // Export
1743 return { 1739 return {
1744 BrowserOptions: BrowserOptions 1740 BrowserOptions: BrowserOptions
1745 }; 1741 };
1746 }); 1742 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698