| Index: chrome/browser/resources/options/browser_options.js
|
| diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
|
| index 6407d29504ba13a74e58ab750589cbb39f460c79..bd1e81763fe3b3c4b585de093a6472acefabebff 100644
|
| --- a/chrome/browser/resources/options/browser_options.js
|
| +++ b/chrome/browser/resources/options/browser_options.js
|
| @@ -17,11 +17,10 @@
|
| DEFAULT: 1
|
| };
|
|
|
| - /**
|
| - * Encapsulated handling of browser options page.
|
| - * @constructor
|
| - * @extends {cr.ui.pageManager.Page}
|
| - */
|
| + //
|
| + // BrowserOptions class
|
| + // Encapsulated handling of browser options page.
|
| + //
|
| function BrowserOptions() {
|
| Page.call(this, 'settings', loadTimeData.getString('settingsTitle'),
|
| 'settings');
|
| @@ -737,7 +736,7 @@
|
| section.classList.add('sliding');
|
|
|
| // Force a style recalc before starting the animation.
|
| - /** @suppress {suspiciousCode} */
|
| + /** @suppress {uselessCode} */
|
| section.offsetHeight;
|
|
|
| section.style.height = (showing ? container.offsetHeight : 0) + 'px';
|
| @@ -1417,25 +1416,16 @@
|
| ManageProfileOverlay.showDeleteDialog(this.getCurrentProfile_());
|
| },
|
|
|
| - /**
|
| - * @param {boolean} enabled
|
| - */
|
| setNativeThemeButtonEnabled_: function(enabled) {
|
| var button = $('themes-native-button');
|
| if (button)
|
| button.disabled = !enabled;
|
| },
|
|
|
| - /**
|
| - * @param {boolean} enabled
|
| - */
|
| setThemesResetButtonEnabled_: function(enabled) {
|
| $('themes-reset').disabled = !enabled;
|
| },
|
|
|
| - /**
|
| - * @param {boolean} managed
|
| - */
|
| setAccountPictureManaged_: function(managed) {
|
| var picture = $('account-picture');
|
| if (managed || UIAccountTweaks.loggedInAsGuest()) {
|
| @@ -1467,9 +1457,6 @@
|
| }
|
| },
|
|
|
| - /**
|
| - * @param {boolean} managed
|
| - */
|
| setWallpaperManaged_: function(managed) {
|
| var button = $('set-wallpaper');
|
| button.disabled = !!managed;
|
| @@ -1921,7 +1908,7 @@
|
| };
|
|
|
| //Forward public APIs to private implementations.
|
| - cr.makePublic(BrowserOptions, [
|
| + [
|
| 'addBluetoothDevice',
|
| 'deleteCurrentProfile',
|
| 'enableCertificateButton',
|
| @@ -1966,8 +1953,14 @@
|
| 'updateEasyUnlock',
|
| 'updateManagesSupervisedUsers',
|
| 'updateSearchEngines',
|
| + 'updateStartupPages',
|
| 'updateSyncState',
|
| - ]);
|
| + ].forEach(function(name) {
|
| + BrowserOptions[name] = function() {
|
| + var instance = BrowserOptions.getInstance();
|
| + return instance[name + '_'].apply(instance, arguments);
|
| + };
|
| + });
|
|
|
| if (cr.isChromeOS) {
|
| /**
|
|
|