Commit 2cbf2e6e authored by dschuyler's avatar dschuyler Committed by Commit bot

[MD settings] specify @override on created, ready, and attached

(code health)
BUG=None
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2847963003
Cr-Commit-Position: refs/heads/master@{#468429}
parent 982642b4
......@@ -122,16 +122,18 @@ Polymer({
'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)',
'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)',
// <if expr="is_linux and not chromeos">
// <if expr="is_linux and not chromeos">
// NOTE: this pref only exists on Linux.
'useSystemThemePrefChanged_(prefs.extensions.theme.use_system.value)',
// </if>
// </if>
],
/** @override */
created: function() {
this.browserProxy_ = settings.AppearanceBrowserProxyImpl.getInstance();
},
/** @override */
ready: function() {
this.$.defaultFontSize.menuOptions = this.fontSizeOptions_;
// TODO(dschuyler): Look into adding a listener for the
......@@ -196,7 +198,7 @@ Polymer({
return this.themeUrl_ || loadTimeData.getString('themesGalleryUrl');
},
// <if expr="chromeos">
// <if expr="chromeos">
/**
* ChromeOS only.
* @private
......@@ -204,14 +206,14 @@ Polymer({
openWallpaperManager_: function() {
this.browserProxy_.openWallpaperManager();
},
// </if>
// </if>
/** @private */
onUseDefaultTap_: function() {
this.browserProxy_.useDefaultTheme();
},
// <if expr="is_linux and not chromeos">
// <if expr="is_linux and not chromeos">
/**
* @param {boolean} useSystemTheme
* @private
......@@ -256,7 +258,7 @@ Polymer({
onUseSystemTap_: function() {
this.browserProxy_.useSystemTheme();
},
// </if>
// </if>
/**
* @param {string} themeId
......@@ -276,12 +278,12 @@ Polymer({
}
var i18nId;
// <if expr="is_linux and not chromeos">
// <if expr="is_linux and not chromeos">
i18nId = useSystemTheme ? 'systemTheme' : 'classicTheme';
// </if>
// <if expr="not is_linux or chromeos">
// </if>
// <if expr="not is_linux or chromeos">
i18nId = 'chooseFromWebStore';
// </if>
// </if>
this.themeSublabel_ = this.i18n(i18nId);
this.themeUrl_ = '';
},
......
......@@ -94,6 +94,7 @@ Polymer({
'prefs.cros.system.timezone.value, timeZoneAutoDetect_)',
],
/** @override */
attached: function() {
this.addWebUIListener(
'time-zone-auto-detect-policy',
......
......@@ -34,6 +34,7 @@ Polymer({
this.browserProxy_ = settings.DefaultBrowserBrowserProxyImpl.getInstance();
},
/** @override */
ready: function() {
this.addWebUIListener('settings.updateDefaultBrowserState',
this.updateDefaultBrowserState_.bind(this));
......
......@@ -27,27 +27,28 @@ Polymer({
*/
appChoices_: {
type: Array,
value: function() { return []; }
value: function() {
return [];
}
},
/**
* True if the ARC container has not finished starting yet.
* @private
*/
waitingForAndroid_: {
type: Boolean,
value: false
},
waitingForAndroid_: {type: Boolean, value: false},
},
/** @private {?settings.DevicePageBrowserProxy} */
browserProxy_: null,
/** @override */
created: function() {
this.browserProxy_ = settings.DevicePageBrowserProxyImpl.getInstance();
},
/** @override */
ready: function() {
this.browserProxy_.setNoteTakingAppsUpdatedCallback(
this.onNoteAppsUpdated_.bind(this));
......
......@@ -27,13 +27,16 @@ Polymer({
/** @private {!Array<string>} */
words_: {
type: Array,
value: function() { return []; },
value: function() {
return [];
},
},
},
/** @type {LanguageSettingsPrivate} */
languageSettingsPrivate: null,
/** @override */
ready: function() {
this.languageSettingsPrivate =
settings.languageSettingsPrivateApiForTest ||
......
......@@ -47,7 +47,9 @@ Polymer({
/** @private */
isGuest_: {
type: Boolean,
value: function() { return loadTimeData.getBoolean('isGuest'); }
value: function() {
return loadTimeData.getBoolean('isGuest');
}
},
// <if expr="_google_chrome and not chromeos">
......@@ -124,6 +126,7 @@ Polymer({
'doNotTrackDialogIf.dom-change': 'onDoNotTrackDomChange_',
},
/** @override */
ready: function() {
this.ContentSettingsTypes = settings.ContentSettingsTypes;
......
......@@ -69,6 +69,7 @@ Polymer({
'subControlParams_.value)',
],
/** @override */
ready: function() {
this.addWebUIListener('contentSettingCategoryChanged',
this.onCategoryChanged_.bind(this));
......
......@@ -28,6 +28,7 @@ Polymer({
devices: Array,
},
/** @override */
ready: function() {
this.addWebUIListener('updateDevicesMenu',
this.updateDevicesMenu_.bind(this));
......
......@@ -61,6 +61,7 @@ Polymer({
toggleOnLabel: String,
},
/** @override */
ready: function() {
this.addWebUIListener('setHandlersEnabled',
this.setHandlersEnabled_.bind(this));
......
......@@ -116,6 +116,7 @@ Polymer({
observers: ['configureWidget_(category, categorySubtype)'],
/** @override */
ready: function() {
this.addWebUIListener('contentSettingSitePermissionChanged',
this.siteWithinCategoryChanged_.bind(this));
......
......@@ -39,11 +39,13 @@ var SiteSettingsBehaviorImpl = {
browserProxy: Object,
},
/** @override */
created: function() {
this.browserProxy =
settings.SiteSettingsPrefsBrowserProxyImpl.getInstance();
},
/** @override */
ready: function() {
this.PermissionValues = settings.PermissionValues;
},
......
......@@ -27,6 +27,7 @@ Polymer({
actionMenuModel_: Object
},
/** @override */
ready: function() {
this.fetchUsbDevices_();
},
......
......@@ -26,6 +26,7 @@ Polymer({
},
},
/** @override */
attached: function() {
settings.WebsiteUsagePrivateApi.websiteUsagePolymerInstance = this;
},
......
......@@ -21,6 +21,7 @@ Polymer({
sites_: Array,
},
/** @override */
ready: function() {
this.addWebUIListener('onZoomLevelsChanged',
this.onZoomLevelsChanged_.bind(this));
......@@ -41,8 +42,8 @@ Polymer({
* @param {!{model: !{index: number}}} event
* @private
*/
removeZoomLevel_: function(event) {
var site = this.sites_[event.model.index];
this.browserProxy.removeZoomLevel(site.origin);
removeZoomLevel_: function(event) {
var site = this.sites_[event.model.index];
this.browserProxy.removeZoomLevel(site.origin);
},
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment