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

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: Final suggestions 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
53 chrome.automation.getFocus((function(focus) {
54 if (focus)
55 this.onFocus({target: focus, type: 'focus'});
56 }).bind(this));
52 }; 57 };
53 58
54 DesktopAutomationHandler.prototype = { 59 DesktopAutomationHandler.prototype = {
55 __proto__: BaseAutomationHandler.prototype, 60 __proto__: BaseAutomationHandler.prototype,
56 61
57 /** @override */ 62 /** @override */
58 willHandleEvent_: function(evt) { 63 willHandleEvent_: function(evt) {
59 return !cvox.ChromeVox.isActive; 64 return !cvox.ChromeVox.isActive;
60 }, 65 },
61 66
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 if (cvox.ChromeVox.isMac) 295 if (cvox.ChromeVox.isMac)
291 return; 296 return;
292 chrome.automation.getDesktop(function(desktop) { 297 chrome.automation.getDesktop(function(desktop) {
293 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 298 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
294 }); 299 });
295 }; 300 };
296 301
297 DesktopAutomationHandler.init_(); 302 DesktopAutomationHandler.init_();
298 303
299 }); // goog.scope 304 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698