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

Unified Diff: chrome/browser/resources/chromeos/switch_access/automation_manager.js

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: Created 3 years, 6 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/chromeos/switch_access/automation_manager.js
diff --git a/chrome/browser/resources/chromeos/switch_access/automation_manager.js b/chrome/browser/resources/chromeos/switch_access/automation_manager.js
index 38e544791cf049a4459223fc04e66f535c99dc3b..13975dd8f2df0e6c5ec9fd5923808ed8c7918f34 100644
--- a/chrome/browser/resources/chromeos/switch_access/automation_manager.js
+++ b/chrome/browser/resources/chromeos/switch_access/automation_manager.js
@@ -57,9 +57,9 @@ function AutomationManager(desktop) {
* @const
*/
AutomationManager.Color = {
- SCOPE: '#de742f', // dark orange
- GROUP: '#ffbb33', // light orange
- LEAF: '#78e428' //light green
+ SCOPE: '#de742f', // dark orange
+ GROUP: '#ffbb33', // light orange
+ LEAF: '#78e428' // light green
};
AutomationManager.prototype = {
@@ -74,8 +74,7 @@ AutomationManager.prototype = {
this.printNode_(this.node_);
this.desktop_.addEventListener(
- chrome.automation.EventType.FOCUS,
- this.handleFocusChange_.bind(this),
+ chrome.automation.EventType.FOCUS, this.handleFocusChange_.bind(this),
false);
// TODO(elichtenberg): Eventually use a more specific filter than
@@ -159,8 +158,8 @@ AutomationManager.prototype = {
// tree is deleted. Once fixed, can delete this. Should only need to check
// if target is current node.
let removedByRWA =
- treeChange.target.role === chrome.automation.RoleType.ROOT_WEB_AREA
- && !this.node_.role;
+ treeChange.target.role === chrome.automation.RoleType.ROOT_WEB_AREA &&
+ !this.node_.role;
if (!removedByRWA && treeChange.target !== this.node_)
return;
@@ -300,19 +299,17 @@ AutomationManager.prototype = {
let start = opt_start || scope;
let leafPred = function(node) {
- return (node !== scope && AutomationPredicate.isSubtreeLeaf(node, scope))
- || !AutomationPredicate.isInterestingSubtree(node);
+ return (node !== scope &&
+ AutomationPredicate.isSubtreeLeaf(node, scope)) ||
+ !AutomationPredicate.isInterestingSubtree(node);
};
let visitPred = function(node) {
// Avoid visiting the top-level root node (i.e., the desktop node).
- return node !== this.desktop_
- && AutomationPredicate.isSubtreeLeaf(node, scope);
+ return node !== this.desktop_ &&
+ AutomationPredicate.isSubtreeLeaf(node, scope);
}.bind(this);
- let restrictions = {
- leaf: leafPred,
- visit: visitPred
- };
+ let restrictions = {leaf: leafPred, visit: visitPred};
return new AutomationTreeWalker(start, scope, restrictions);
},
@@ -334,8 +331,8 @@ AutomationManager.prototype = {
else {
let numSiblings = node.parent.children.length;
console.log(
- 'At index ' + node.indexInParent + ', there are '
- + numSiblings + ' siblings');
+ 'At index ' + node.indexInParent + ', there are ' + numSiblings +
+ ' siblings');
}
console.log('Has ' + node.children.length + ' children');
} else {
« no previous file with comments | « chrome/browser/resources/chromeos/slow.js ('k') | chrome/browser/resources/chromeos/switch_access/automation_predicate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698