OLD | NEW |
---|---|
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 Loading... | |
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 console.log(evt.type + ' on ' + node.role + ' ' + node.name); | |
David Tseng
2016/01/08 21:39:32
nit: remove
dmazzoni
2016/01/11 22:04:06
Done.
| |
60 | 61 |
61 if (!node) | 62 if (!node) |
62 return; | 63 return; |
63 | 64 |
64 var prevRange = ChromeVoxState.instance.currentRange; | 65 var prevRange = ChromeVoxState.instance.currentRange; |
65 | 66 |
66 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node)); | 67 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node)); |
67 | 68 |
68 // Check to see if we've crossed roots. Continue if we've crossed roots or | 69 // Check to see if we've crossed roots. Continue if we've crossed roots or |
69 // are not within web content. | 70 // are not within web content. |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 if (cvox.ChromeVox.isMac) | 311 if (cvox.ChromeVox.isMac) |
311 return; | 312 return; |
312 chrome.automation.getDesktop(function(desktop) { | 313 chrome.automation.getDesktop(function(desktop) { |
313 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); | 314 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); |
314 }); | 315 }); |
315 }; | 316 }; |
316 | 317 |
317 DesktopAutomationHandler.init_(); | 318 DesktopAutomationHandler.init_(); |
318 | 319 |
319 }); // goog.scope | 320 }); // goog.scope |
OLD | NEW |