Index: chrome/browser/resources/access_chromevox/common/custom_walker.js |
=================================================================== |
--- chrome/browser/resources/access_chromevox/common/custom_walker.js (revision 0) |
+++ chrome/browser/resources/access_chromevox/common/custom_walker.js (revision 0) |
@@ -0,0 +1,96 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+goog.provide('cvox.CustomWalker'); |
+ |
+/** |
+ * @fileoverview A skeleton JavaScript class for performing site specific |
+ * navigation. Site specific scripts should create a CustomWalker object, |
+ * implement these methods, and pass it back to the navigation manager. |
+ */ |
+ |
+ |
+/** |
+ * @constructor |
+ */ |
+cvox.CustomWalker = function() { |
+ |
+}; |
+ |
+/** |
+ * Moves selection to the next item. |
+ * @return {boolean} Returns true if the selection was moved successfully. |
+ */ |
+cvox.CustomWalker.prototype.next = function() { |
+ return false; |
+}; |
+ |
+/** |
+ * Moves selection to the previous item. |
+ * @return {boolean} Returns true if the selection was moved successfully. |
+ */ |
+cvox.CustomWalker.prototype.previous = function() { |
+ return false; |
+}; |
+ |
+/** |
+ * Does the primary action for the current item (ie, if it is a link, |
+ * click on it). |
+ * |
+ * TODO (clchen): Add a default action. |
+ * |
+ * @return {boolean} Returns true if the action was done successfully. |
+ */ |
+cvox.CustomWalker.prototype.actOnCurrentItem = function() { |
+ return false; |
+}; |
+ |
+/** |
+ * Returns the current node. |
+ * @return {Object} The current node. |
+ */ |
+cvox.CustomWalker.prototype.getCurrentNode = function() { |
+ return null; |
+}; |
+ |
+/** |
+ * Returns the current content. |
+ * @return {String} The current content. |
+ */ |
+cvox.CustomWalker.prototype.getCurrentContent = function() { |
+ return ''; |
+}; |
+ |
+/** |
+ * Returns a description of the current content. This is secondary |
+ * information about the current content which may be omitted if |
+ * the user has a lower verbosity setting. |
+ * @return {String} The current description. |
+ */ |
+cvox.CustomWalker.prototype.getCurrentDescription = function() { |
+ return ''; |
+}; |
+ |
+/** |
+ * Sets the given targetNode as the current position. |
+ * @param {Object} targetNode The node to set the position to. |
+ */ |
+cvox.CustomWalker.prototype.setCurrentNode = function(targetNode) { |
+}; |
+ |
+/** |
+ * Moves selection to the current item and speaks it. |
+ */ |
+cvox.CustomWalker.prototype.goToCurrentItem = function() { |
+}; |
+ |
+/** |
+ * Checks if the custom walker is able to act on the current item. |
+ * |
+ * @return {boolean} True if some action is possible. |
+ */ |
+cvox.CustomWalker.prototype.canActOnCurrentItem = function() { |
+ return true; |
+}; |
+ |
Property changes on: chrome/browser/resources/access_chromevox/common/custom_walker.js |
___________________________________________________________________ |
Added: svn:executable |
+ * |
Added: svn:eol-style |
+ LF |