OLD | NEW |
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 /** | 5 /** |
6 * @fileoverview The entry point for all ChromeVox2 related code for the | 6 * @fileoverview The entry point for all ChromeVox2 related code for the |
7 * background page. | 7 * background page. |
8 */ | 8 */ |
9 | 9 |
10 goog.provide('Background'); | 10 goog.provide('Background'); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 } | 343 } |
344 | 344 |
345 if (pred) { | 345 if (pred) { |
346 var node = AutomationUtil.findNextNode( | 346 var node = AutomationUtil.findNextNode( |
347 current.getBound(dir).node, dir, pred); | 347 current.getBound(dir).node, dir, pred); |
348 | 348 |
349 if (node) { | 349 if (node) { |
350 current = cursors.Range.fromNode(node); | 350 current = cursors.Range.fromNode(node); |
351 } else { | 351 } else { |
352 if (predErrorMsg) { | 352 if (predErrorMsg) { |
353 cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg(predErrorMsg), | 353 cvox.ChromeVox.tts.speak(Msgs.getMsg(predErrorMsg), |
354 cvox.QueueMode.FLUSH); | 354 cvox.QueueMode.FLUSH); |
355 } | 355 } |
356 return; | 356 return; |
357 } | 357 } |
358 } | 358 } |
359 | 359 |
360 if (current) { | 360 if (current) { |
361 // TODO(dtseng): Figure out what it means to focus a range. | 361 // TODO(dtseng): Figure out what it means to focus a range. |
362 var actionNode = current.start.node; | 362 var actionNode = current.start.node; |
363 if (actionNode.role == RoleType.inlineTextBox) | 363 if (actionNode.role == RoleType.inlineTextBox) |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 node.state.protected, | 790 node.state.protected, |
791 cvox.ChromeVox.tts); | 791 cvox.ChromeVox.tts); |
792 } | 792 } |
793 } | 793 } |
794 }; | 794 }; |
795 | 795 |
796 /** @type {Background} */ | 796 /** @type {Background} */ |
797 global.backgroundObj = new Background(); | 797 global.backgroundObj = new Background(); |
798 | 798 |
799 }); // goog.scope | 799 }); // goog.scope |
OLD | NEW |