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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 1938123002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/automation/automation_node.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index ade163d8228e7b2099d673f8b0b57020eb4add5f..ab5d26aa47bc2d04b0b2b4884f75864d7886a189 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -937,46 +937,57 @@ AutomationRootNodeImpl.prototype = {
},
};
-var AutomationNode = utils.expose('AutomationNode',
- AutomationNodeImpl,
- { functions: ['doDefault',
- 'find',
- 'findAll',
- 'focus',
- 'makeVisible',
- 'matches',
- 'setSelection',
- 'showContextMenu',
- 'addEventListener',
- 'removeEventListener',
- 'domQuerySelector',
- 'toString',
- 'boundsForRange'],
- readonly: publicAttributes.concat(
- ['parent',
- 'firstChild',
- 'lastChild',
- 'children',
- 'previousSibling',
- 'nextSibling',
- 'isRootNode',
- 'role',
- 'state',
- 'location',
- 'indexInParent',
- 'root']) });
-
-var AutomationRootNode = utils.expose('AutomationRootNode',
- AutomationRootNodeImpl,
- { superclass: AutomationNode,
- readonly: ['docTitle',
- 'docUrl',
- 'docLoaded',
- 'docLoadingProgress',
- 'anchorObject',
- 'anchorOffset',
- 'focusObject',
- 'focusOffset'] });
+function AutomationNode() {
+ privates(AutomationNode).constructPrivate(this, arguments);
+}
+utils.expose(AutomationNode, AutomationNodeImpl, {
+ functions: [
+ 'doDefault',
+ 'find',
+ 'findAll',
+ 'focus',
+ 'makeVisible',
+ 'matches',
+ 'setSelection',
+ 'showContextMenu',
+ 'addEventListener',
+ 'removeEventListener',
+ 'domQuerySelector',
+ 'toString',
+ 'boundsForRange',
+ ],
+ readonly: $Array.concat(publicAttributes, [
+ 'parent',
+ 'firstChild',
+ 'lastChild',
+ 'children',
+ 'previousSibling',
+ 'nextSibling',
+ 'isRootNode',
+ 'role',
+ 'state',
+ 'location',
+ 'indexInParent',
+ 'root',
+ ]),
+});
+
+function AutomationRootNode() {
+ privates(AutomationRootNode).constructPrivate(this, arguments);
+}
+utils.expose(AutomationRootNode, AutomationRootNodeImpl, {
+ superclass: AutomationNode,
+ readonly: [
+ 'docTitle',
+ 'docUrl',
+ 'docLoaded',
+ 'docLoadingProgress',
+ 'anchorObject',
+ 'anchorOffset',
+ 'focusObject',
+ 'focusOffset',
+ ],
+});
AutomationRootNode.get = function(treeID) {
return AutomationRootNodeImpl.get(treeID);

Powered by Google App Engine
This is Rietveld 408576698