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

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

Issue 1561773002: Implement ChromeVox Next menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@panel_view_type
Patch Set: Address feedback Created 4 years, 11 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 willHandleEvent_: function(evt) { 50 willHandleEvent_: function(evt) {
51 return !cvox.ChromeVox.isActive; 51 return !cvox.ChromeVox.isActive;
52 }, 52 },
53 53
54 /** 54 /**
55 * Provides all feedback once ChromeVox's focus changes. 55 * Provides all feedback once ChromeVox's focus changes.
56 * @param {!AutomationEvent} evt 56 * @param {!AutomationEvent} evt
57 */ 57 */
58 onEventDefault: function(evt) { 58 onEventDefault: function(evt) {
59 var node = evt.target; 59 var node = evt.target;
60
61 if (!node) 60 if (!node)
62 return; 61 return;
63 62
64 var prevRange = ChromeVoxState.instance.currentRange; 63 var prevRange = ChromeVoxState.instance.currentRange;
65 64
66 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node)); 65 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node));
67 66
68 // Check to see if we've crossed roots. Continue if we've crossed roots or 67 // Check to see if we've crossed roots. Continue if we've crossed roots or
69 // are not within web content. 68 // are not within web content.
70 if (node.root.role == RoleType.desktop || 69 if (node.root.role == RoleType.desktop ||
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 if (cvox.ChromeVox.isMac) 309 if (cvox.ChromeVox.isMac)
311 return; 310 return;
312 chrome.automation.getDesktop(function(desktop) { 311 chrome.automation.getDesktop(function(desktop) {
313 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 312 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
314 }); 313 });
315 }; 314 };
316 315
317 DesktopAutomationHandler.init_(); 316 DesktopAutomationHandler.init_();
318 317
319 }); // goog.scope 318 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698