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

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

Issue 1365433002: Add setSelection function to automation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nobrailleautostartintests
Patch Set: rebase Created 5 years, 3 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 IsInteractPermitted = 8 var IsInteractPermitted =
9 requireNative('automationInternal').IsInteractPermitted; 9 requireNative('automationInternal').IsInteractPermitted;
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 focus: function() { 238 focus: function() {
239 this.performAction_('focus'); 239 this.performAction_('focus');
240 }, 240 },
241 241
242 makeVisible: function() { 242 makeVisible: function() {
243 this.performAction_('makeVisible'); 243 this.performAction_('makeVisible');
244 }, 244 },
245 245
246 setSelection: function(startIndex, endIndex) { 246 setSelection: function(startIndex, endIndex) {
247 this.performAction_('setSelection', 247 this.performAction_('setSelection',
248 { startIndex: startIndex, 248 { focusNodeID: this.id,
249 endIndex: endIndex }); 249 anchorOffset: startIndex,
250 focusOffset: endIndex });
250 }, 251 },
251 252
252 showContextMenu: function() { 253 showContextMenu: function() {
253 this.performAction_('showContextMenu'); 254 this.performAction_('showContextMenu');
254 }, 255 },
255 256
256 domQuerySelector: function(selector, callback) { 257 domQuerySelector: function(selector, callback) {
257 automationInternal.querySelector( 258 automationInternal.querySelector(
258 { treeID: this.rootImpl.treeID, 259 { treeID: this.rootImpl.treeID,
259 automationNodeID: this.id, 260 automationNodeID: this.id,
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 AutomationRootNode.getOrCreate = function(treeID) { 876 AutomationRootNode.getOrCreate = function(treeID) {
876 return AutomationRootNodeImpl.getOrCreate(treeID); 877 return AutomationRootNodeImpl.getOrCreate(treeID);
877 } 878 }
878 879
879 AutomationRootNode.destroy = function(treeID) { 880 AutomationRootNode.destroy = function(treeID) {
880 AutomationRootNodeImpl.destroy(treeID); 881 AutomationRootNodeImpl.destroy(treeID);
881 } 882 }
882 883
883 exports.AutomationNode = AutomationNode; 884 exports.AutomationNode = AutomationNode;
884 exports.AutomationRootNode = AutomationRootNode; 885 exports.AutomationRootNode = AutomationRootNode;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698