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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 577843003: Revert of Add public API generation with cr.makePublic() and handle it in compiler pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_3
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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) {
/**

Powered by Google App Engine
This is Rietveld 408576698