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

Side by Side Diff: chrome/browser/resources/access_chromevox/common/custom_walker.js

Issue 6254007: Adding ChromeVox as a component extensions (enabled only for ChromeOS, for no... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 goog.provide('cvox.CustomWalker');
6
7 /**
8 * @fileoverview A skeleton JavaScript class for performing site specific
9 * navigation. Site specific scripts should create a CustomWalker object,
10 * implement these methods, and pass it back to the navigation manager.
11 */
12
13
14 /**
15 * @constructor
16 */
17 cvox.CustomWalker = function() {
18
19 };
20
21 /**
22 * Moves selection to the next item.
23 * @return {boolean} Returns true if the selection was moved successfully.
24 */
25 cvox.CustomWalker.prototype.next = function() {
26 return false;
27 };
28
29 /**
30 * Moves selection to the previous item.
31 * @return {boolean} Returns true if the selection was moved successfully.
32 */
33 cvox.CustomWalker.prototype.previous = function() {
34 return false;
35 };
36
37 /**
38 * Does the primary action for the current item (ie, if it is a link,
39 * click on it).
40 *
41 * TODO (clchen): Add a default action.
42 *
43 * @return {boolean} Returns true if the action was done successfully.
44 */
45 cvox.CustomWalker.prototype.actOnCurrentItem = function() {
46 return false;
47 };
48
49 /**
50 * Returns the current node.
51 * @return {Object} The current node.
52 */
53 cvox.CustomWalker.prototype.getCurrentNode = function() {
54 return null;
55 };
56
57 /**
58 * Returns the current content.
59 * @return {String} The current content.
60 */
61 cvox.CustomWalker.prototype.getCurrentContent = function() {
62 return '';
63 };
64
65 /**
66 * Returns a description of the current content. This is secondary
67 * information about the current content which may be omitted if
68 * the user has a lower verbosity setting.
69 * @return {String} The current description.
70 */
71 cvox.CustomWalker.prototype.getCurrentDescription = function() {
72 return '';
73 };
74
75 /**
76 * Sets the given targetNode as the current position.
77 * @param {Object} targetNode The node to set the position to.
78 */
79 cvox.CustomWalker.prototype.setCurrentNode = function(targetNode) {
80 };
81
82 /**
83 * Moves selection to the current item and speaks it.
84 */
85 cvox.CustomWalker.prototype.goToCurrentItem = function() {
86 };
87
88 /**
89 * Checks if the custom walker is able to act on the current item.
90 *
91 * @return {boolean} True if some action is possible.
92 */
93 cvox.CustomWalker.prototype.canActOnCurrentItem = function() {
94 return true;
95 };
96
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698