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 b6a566a3be651153513ab16e34ab4384553ad2ec..8a6324ff7e5e6ef671e821b109eef16ac3b850f3 100644 |
--- a/chrome/browser/resources/options/browser_options.js |
+++ b/chrome/browser/resources/options/browser_options.js |
@@ -17,10 +17,11 @@ cr.define('options', function() { |
DEFAULT: 1 |
}; |
- // |
- // BrowserOptions class |
- // Encapsulated handling of browser options page. |
- // |
+ /** |
+ * Encapsulated handling of browser options page. |
+ * @constructor |
+ * @extends {cr.ui.pageManager.Page} |
+ */ |
function BrowserOptions() { |
Page.call(this, 'settings', loadTimeData.getString('settingsTitle'), |
'settings'); |
@@ -1428,16 +1429,25 @@ cr.define('options', function() { |
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()) { |
@@ -1469,6 +1479,9 @@ cr.define('options', function() { |
} |
}, |
+ /** |
+ * @param {boolean} managed |
+ */ |
setWallpaperManaged_: function(managed) { |
var button = $('set-wallpaper'); |
button.disabled = !!managed; |
@@ -1912,8 +1925,16 @@ cr.define('options', function() { |
}, |
}; |
+ /** |
+ * Fake declaration made for Closure Compiler. Actual method definition is |
+ * in the base class. |
+ * @param {Array} pages List of startup pages. |
+ * @private |
+ */ |
+ BrowserOptions.prototype.updateStartupPages_; |
Dan Beam
2014/09/10 19:26:27
please minimize the amount of useless code we writ
Vitaly Pavlenko
2014/09/10 20:25:21
For this feature I need exactly these three fake d
Tyler Breisacher (Chromium)
2014/09/10 20:50:32
Hang on, if this is a private method of the base c
Dan Beam
2014/09/10 21:08:19
see other comments on this review
Dan Beam
2014/09/12 00:57:51
no, if possible, don't add them
Vitaly Pavlenko
2014/09/12 18:38:07
Ok, then I'd like to remove that as a dead code :)
|
+ |
//Forward public APIs to private implementations. |
- [ |
+ cr.makePublic(BrowserOptions, [ |
'addBluetoothDevice', |
'deleteCurrentProfile', |
'enableCertificateButton', |
@@ -1960,12 +1981,7 @@ cr.define('options', function() { |
'updateSearchEngines', |
'updateStartupPages', |
'updateSyncState', |
- ].forEach(function(name) { |
- BrowserOptions[name] = function() { |
- var instance = BrowserOptions.getInstance(); |
- return instance[name + '_'].apply(instance, arguments); |
- }; |
- }); |
+ ]); |
if (cr.isChromeOS) { |
/** |