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

Unified Diff: ui/webui/resources/js/cr/ui/menu_item.js

Issue 2603443002: Clang format JS: Disallow single line functions, conditionals, loops, and switch statements (Closed)
Patch Set: update c/b/r/ as well Created 4 years 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
« no previous file with comments | « ui/webui/resources/js/cr/ui/menu_button.js ('k') | ui/webui/resources/js/cr/ui/overlay.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/menu_item.js
diff --git a/ui/webui/resources/js/cr/ui/menu_item.js b/ui/webui/resources/js/cr/ui/menu_item.js
index eaf5b62749e69fd3597dac4cdc03405108bba8f6..17f2783c3e2c570a3fb92d4b9dabfb56c71de99b 100644
--- a/ui/webui/resources/js/cr/ui/menu_item.js
+++ b/ui/webui/resources/js/cr/ui/menu_item.js
@@ -58,7 +58,9 @@ cr.define('cr.ui', function() {
* @type {cr.ui.Command}
*/
command_: null,
- get command() { return this.command_; },
+ get command() {
+ return this.command_;
+ },
set command(command) {
if (this.command_) {
this.command_.removeEventListener('labelChange', this);
@@ -96,20 +98,30 @@ cr.define('cr.ui', function() {
* The text label.
* @type {string}
*/
- get label() { return this.textContent; },
- set label(label) { this.textContent = label; },
+ get label() {
+ return this.textContent;
+ },
+ set label(label) {
+ this.textContent = label;
+ },
/**
* Menu icon.
* @type {string}
*/
- get iconUrl() { return this.style.backgroundImage; },
- set iconUrl(url) { this.style.backgroundImage = 'url(' + url + ')'; },
+ get iconUrl() {
+ return this.style.backgroundImage;
+ },
+ set iconUrl(url) {
+ this.style.backgroundImage = 'url(' + url + ')';
+ },
/**
* @return {boolean} Whether the menu item is a separator.
*/
- isSeparator: function() { return this.tagName == 'HR'; },
+ isSeparator: function() {
+ return this.tagName == 'HR';
+ },
/**
* Updates shortcut text according to associated command. If command has
« no previous file with comments | « ui/webui/resources/js/cr/ui/menu_button.js ('k') | ui/webui/resources/js/cr/ui/overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698