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

Side by Side Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 743273002: Various changes required to support ChromeVox Next to read Views and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var AutomationEvent = require('automationEvent').AutomationEvent; 5 var AutomationEvent = require('automationEvent').AutomationEvent;
6 var automationInternal = 6 var automationInternal =
7 require('binding').Binding.create('automationInternal').generate(); 7 require('binding').Binding.create('automationInternal').generate();
8 var IsInteractPermitted = 8 var IsInteractPermitted =
9 requireNative('automationInternal').IsInteractPermitted; 9 requireNative('automationInternal').IsInteractPermitted;
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 firstChild: function() { 46 firstChild: function() {
47 return this.childTree || this.rootImpl.get(this.childIds[0]); 47 return this.childTree || this.rootImpl.get(this.childIds[0]);
48 }, 48 },
49 49
50 lastChild: function() { 50 lastChild: function() {
51 var childIds = this.childIds; 51 var childIds = this.childIds;
52 return this.childTree || this.rootImpl.get(childIds[childIds.length - 1]); 52 return this.childTree || this.rootImpl.get(childIds[childIds.length - 1]);
53 }, 53 },
54 54
55 children: function() { 55 children: function() {
56 if (this.childTree)
57 return [this.childTree];
58
56 var children = []; 59 var children = [];
57 for (var i = 0, childID; childID = this.childIds[i]; i++) { 60 for (var i = 0, childID; childID = this.childIds[i]; i++) {
58 logging.CHECK(this.rootImpl.get(childID)); 61 logging.CHECK(this.rootImpl.get(childID));
59 children.push(this.rootImpl.get(childID)); 62 children.push(this.rootImpl.get(childID));
60 } 63 }
61 return children; 64 return children;
62 }, 65 },
63 66
64 previousSibling: function() { 67 previousSibling: function() {
65 var parent = this.parent(); 68 var parent = this.parent();
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 'attributes', 741 'attributes',
739 'indexInParent', 742 'indexInParent',
740 'root'] }); 743 'root'] });
741 744
742 var AutomationRootNode = utils.expose('AutomationRootNode', 745 var AutomationRootNode = utils.expose('AutomationRootNode',
743 AutomationRootNodeImpl, 746 AutomationRootNodeImpl,
744 { superclass: AutomationNode }); 747 { superclass: AutomationNode });
745 748
746 exports.AutomationNode = AutomationNode; 749 exports.AutomationNode = AutomationNode;
747 exports.AutomationRootNode = AutomationRootNode; 750 exports.AutomationRootNode = AutomationRootNode;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698