diff options
Diffstat (limited to 'chromium/chrome/browser/resources/settings/controls/controlled_button.js')
-rw-r--r-- | chromium/chrome/browser/resources/settings/controls/controlled_button.js | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/chromium/chrome/browser/resources/settings/controls/controlled_button.js b/chromium/chrome/browser/resources/settings/controls/controlled_button.js index 43f07fd36c0..e751237cab2 100644 --- a/chromium/chrome/browser/resources/settings/controls/controlled_button.js +++ b/chromium/chrome/browser/resources/settings/controls/controlled_button.js @@ -11,11 +11,6 @@ Polymer({ ], properties: { - actionButton: { - type: Boolean, - value: false, - }, - endJustified: { type: Boolean, value: false, @@ -31,6 +26,12 @@ Polymer({ }, /** @private */ + actionClass_: { + type: String, + value: '' + }, + + /** @private */ enforced_: { type: Boolean, computed: 'isPrefEnforced(pref.*)', @@ -38,6 +39,18 @@ Polymer({ }, }, + /** @override */ + attached: function() { + if (this.classList.contains('action-button')) { + this.actionClass_ = 'action-button'; + } + }, + + /** Focus on the inner cr-button. */ + focus: function() { + this.$$('cr-button').focus(); + }, + /** * @param {!Event} e * @private @@ -49,15 +62,6 @@ Polymer({ }, /** - * @param {!boolean} actionButton - * @return {string} Class of the cr-button. - * @private - */ - getClass_: function(actionButton) { - return actionButton ? 'action-button' : ''; - }, - - /** * @param {!boolean} enforced * @param {!boolean} disabled * @return {boolean} True if the button should be enabled. |