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

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

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for failing tests Created 4 years, 8 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 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 exceptionHandler = require('uncaught_exception_handler'); 8 var exceptionHandler = require('uncaught_exception_handler');
9 var IsInteractPermitted = 9 var IsInteractPermitted =
10 requireNative('automationInternal').IsInteractPermitted; 10 requireNative('automationInternal').IsInteractPermitted;
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 indent += ' '; 932 indent += ' ';
933 var children = nodeImpl.children; 933 var children = nodeImpl.children;
934 for (var i = 0; i < children.length; ++i) 934 for (var i = 0; i < children.length; ++i)
935 output += toStringInternal(privates(children[i]).impl, indent); 935 output += toStringInternal(privates(children[i]).impl, indent);
936 return output; 936 return output;
937 } 937 }
938 return toStringInternal(this, ''); 938 return toStringInternal(this, '');
939 }, 939 },
940 }; 940 };
941 941
942 var AutomationNode = utils.expose('AutomationNode', 942 function AutomationNode() {
943 AutomationNodeImpl, 943 privates(AutomationNode).constructPrivate(this, arguments);
944 { functions: ['doDefault', 944 }
945 'find', 945 utils.expose(AutomationNode, AutomationNodeImpl, {
946 'findAll', 946 functions: [
947 'focus', 947 'doDefault',
948 'makeVisible', 948 'find',
949 'matches', 949 'findAll',
950 'setSelection', 950 'focus',
951 'showContextMenu', 951 'makeVisible',
952 'addEventListener', 952 'matches',
953 'removeEventListener', 953 'setSelection',
954 'domQuerySelector', 954 'showContextMenu',
955 'toString', 955 'addEventListener',
956 'boundsForRange'], 956 'removeEventListener',
957 readonly: publicAttributes.concat( 957 'domQuerySelector',
958 ['parent', 958 'toString',
959 'firstChild', 959 'boundsForRange',
960 'lastChild', 960 ],
961 'children', 961 readonly: $Array.concat(publicAttributes, [
962 'previousSibling', 962 'parent',
963 'nextSibling', 963 'firstChild',
964 'isRootNode', 964 'lastChild',
965 'role', 965 'children',
966 'state', 966 'previousSibling',
967 'location', 967 'nextSibling',
968 'indexInParent', 968 'isRootNode',
969 'root']) }); 969 'role',
970 'state',
971 'location',
972 'indexInParent',
973 'root',
974 ]),
975 });
970 976
971 var AutomationRootNode = utils.expose('AutomationRootNode', 977 function AutomationRootNode() {
972 AutomationRootNodeImpl, 978 privates(AutomationRootNode).constructPrivate(this, arguments);
973 { superclass: AutomationNode, 979 }
974 readonly: ['docTitle', 980 utils.expose(AutomationRootNode, AutomationRootNodeImpl, {
975 'docUrl', 981 superclass: AutomationNode,
976 'docLoaded', 982 readonly: [
977 'docLoadingProgress', 983 'docTitle',
978 'anchorObject', 984 'docUrl',
979 'anchorOffset', 985 'docLoaded',
980 'focusObject', 986 'docLoadingProgress',
981 'focusOffset'] }); 987 'anchorObject',
988 'anchorOffset',
989 'focusObject',
990 'focusOffset',
991 ],
992 });
982 993
983 AutomationRootNode.get = function(treeID) { 994 AutomationRootNode.get = function(treeID) {
984 return AutomationRootNodeImpl.get(treeID); 995 return AutomationRootNodeImpl.get(treeID);
985 } 996 }
986 997
987 AutomationRootNode.getOrCreate = function(treeID) { 998 AutomationRootNode.getOrCreate = function(treeID) {
988 return AutomationRootNodeImpl.getOrCreate(treeID); 999 return AutomationRootNodeImpl.getOrCreate(treeID);
989 } 1000 }
990 1001
991 AutomationRootNode.destroy = function(treeID) { 1002 AutomationRootNode.destroy = function(treeID) {
992 AutomationRootNodeImpl.destroy(treeID); 1003 AutomationRootNodeImpl.destroy(treeID);
993 } 1004 }
994 1005
995 exports.$set('AutomationNode', AutomationNode); 1006 exports.$set('AutomationNode', AutomationNode);
996 exports.$set('AutomationRootNode', AutomationRootNode); 1007 exports.$set('AutomationRootNode', AutomationRootNode);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698