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

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

Issue 880063002: Ensure WebView notifies desktop automation on creation, destruction, and change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leaks? Created 5 years, 10 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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 } 721 }
722 722
723 return success; 723 return success;
724 }, 724 },
725 725
726 setData_: function(node, nodeData) { 726 setData_: function(node, nodeData) {
727 var nodeImpl = privates(node).impl; 727 var nodeImpl = privates(node).impl;
728 728
729 // TODO(dtseng): Make into set listing all hosting node roles. 729 // TODO(dtseng): Make into set listing all hosting node roles.
730 if (nodeData.role == schema.RoleType.webView) { 730 if (nodeData.role == schema.RoleType.webView) {
731 if (nodeImpl.pendingChildFrame === undefined) 731 if (nodeImpl.childTreeID !== nodeData.intAttributes.childTreeId)
732 nodeImpl.pendingChildFrame = true; 732 nodeImpl.pendingChildFrame = true;
733 733
734 if (nodeImpl.pendingChildFrame) { 734 if (nodeImpl.pendingChildFrame) {
735 nodeImpl.childTreeID = nodeData.intAttributes.childTreeId; 735 nodeImpl.childTreeID = nodeData.intAttributes.childTreeId;
736 automationInternal.enableFrame(nodeImpl.childTreeID); 736 automationInternal.enableFrame(nodeImpl.childTreeID);
737 automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) { 737 automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) {
738 nodeImpl.pendingChildFrame = false; 738 nodeImpl.pendingChildFrame = false;
739 nodeImpl.childTree = root; 739 nodeImpl.childTree = root;
740 privates(root).impl.hostTree = node; 740 privates(root).impl.hostTree = node;
741 nodeImpl.dispatchEvent(schema.EventType.childrenChanged); 741 nodeImpl.dispatchEvent(schema.EventType.childrenChanged);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 'attributes', 983 'attributes',
984 'indexInParent', 984 'indexInParent',
985 'root'] }); 985 'root'] });
986 986
987 var AutomationRootNode = utils.expose('AutomationRootNode', 987 var AutomationRootNode = utils.expose('AutomationRootNode',
988 AutomationRootNodeImpl, 988 AutomationRootNodeImpl,
989 { superclass: AutomationNode }); 989 { superclass: AutomationNode });
990 990
991 exports.AutomationNode = AutomationNode; 991 exports.AutomationNode = AutomationNode;
992 exports.AutomationRootNode = AutomationRootNode; 992 exports.AutomationRootNode = AutomationRootNode;
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/testing/mock_tts.js ('k') | chrome/test/base/extension_js_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698