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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js

Issue 1589623002: Keep track of accessibility focus across windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Mac expectations Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview Handles automation from a desktop automation node. 6 * @fileoverview Handles automation from a desktop automation node.
7 */ 7 */
8 8
9 goog.provide('DesktopAutomationHandler'); 9 goog.provide('DesktopAutomationHandler');
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // The focused state gets set on the containing webView node. 42 // The focused state gets set on the containing webView node.
43 var webView = node.find({role: RoleType.webView, state: {focused: true}}); 43 var webView = node.find({role: RoleType.webView, state: {focused: true}});
44 if (webView) { 44 if (webView) {
45 var root = webView.find({role: RoleType.rootWebArea}); 45 var root = webView.find({role: RoleType.rootWebArea});
46 if (root) { 46 if (root) {
47 this.onLoadComplete( 47 this.onLoadComplete(
48 {target: root, 48 {target: root,
49 type: chrome.automation.EventType.loadComplete}); 49 type: chrome.automation.EventType.loadComplete});
50 } 50 }
51 } 51 }
52
David Tseng 2016/02/17 23:55:56 No need for the load complete logic above now?
dmazzoni 2016/02/18 23:56:36 Agreed, let's try removing it in a follow-up.
53 var focus = chrome.automation.getFocus();
54 if (focus)
55 this.onFocus({target: focus, type: 'focus'});
52 }; 56 };
53 57
54 DesktopAutomationHandler.prototype = { 58 DesktopAutomationHandler.prototype = {
55 __proto__: BaseAutomationHandler.prototype, 59 __proto__: BaseAutomationHandler.prototype,
56 60
57 /** @override */ 61 /** @override */
58 willHandleEvent_: function(evt) { 62 willHandleEvent_: function(evt) {
59 return !cvox.ChromeVox.isActive; 63 return !cvox.ChromeVox.isActive;
60 }, 64 },
61 65
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 if (cvox.ChromeVox.isMac) 298 if (cvox.ChromeVox.isMac)
295 return; 299 return;
296 chrome.automation.getDesktop(function(desktop) { 300 chrome.automation.getDesktop(function(desktop) {
297 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 301 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
298 }); 302 });
299 }; 303 };
300 304
301 DesktopAutomationHandler.init_(); 305 DesktopAutomationHandler.init_();
302 306
303 }); // goog.scope 307 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698