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 An interface for an ordered collection of walkers, called a | 6 * @fileoverview An interface for an ordered collection of walkers, called a |
7 * shifter. | 7 * shifter. |
8 */ | 8 */ |
9 | 9 |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 * Returns true if the shifter is currently in subnavigation mode. | 131 * Returns true if the shifter is currently in subnavigation mode. |
132 * @return {boolean} If in subnavigation mode. | 132 * @return {boolean} If in subnavigation mode. |
133 */ | 133 */ |
134 cvox.AbstractShifter.prototype.isSubnavigating = function() { | 134 cvox.AbstractShifter.prototype.isSubnavigating = function() { |
135 return this.isSubnavigating_; | 135 return this.isSubnavigating_; |
136 }; | 136 }; |
137 | 137 |
138 | 138 |
139 /** | 139 /** |
140 * Delegates to current walker. | 140 * Delegates to current walker. |
141 * @param {string} name Action name. | 141 * @param {string} name Action name. |
142 * @return {boolean} True if this shifter contains action. | 142 * @return {boolean} True if this shifter contains action. |
143 */ | 143 */ |
144 cvox.AbstractShifter.prototype.hasAction = function(name) { | 144 cvox.AbstractShifter.prototype.hasAction = function(name) { |
145 return this.currentWalker_.hasAction(name); | 145 return this.currentWalker_.hasAction(name); |
146 }; | 146 }; |
147 | 147 |
148 | 148 |
149 /** | 149 /** |
150 * Delegates an action to the current walker. | 150 * Delegates an action to the current walker. |
151 * @param {string} name The action name. | 151 * @param {string} name The action name. |
152 * @param {!cvox.CursorSelection} sel The current selection. | 152 * @param {!cvox.CursorSelection} sel The current selection. |
153 * @return {cvox.CursorSelection} The selection after the action. | 153 * @return {cvox.CursorSelection} The selection after the action. |
154 */ | 154 */ |
155 cvox.AbstractShifter.prototype.performAction = function(name, sel) { | 155 cvox.AbstractShifter.prototype.performAction = function(name, sel) { |
156 return this.currentWalker_.performAction(name, sel); | 156 return this.currentWalker_.performAction(name, sel); |
157 }; | 157 }; |
158 | 158 |
159 | 159 |
160 /** | 160 /** |
161 * Factory method to create an instance of this shifter. | 161 * Factory method to create an instance of this shifter. |
162 * @param {!cvox.CursorSelection} sel The initial selection. | 162 * @param {!cvox.CursorSelection} sel The initial selection. |
163 * @return {cvox.AbstractShifter} The shifter or null if given a selection not | 163 * @return {cvox.AbstractShifter} The shifter or null if given a selection not |
164 * within the shifter's domain. | 164 * within the shifter's domain. |
165 */ | 165 */ |
166 cvox.AbstractShifter.create = goog.abstractMethod; | 166 cvox.AbstractShifter.create = goog.abstractMethod; |
OLD | NEW |