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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/widget.js

Issue 604423002: Use an enum for ChromeVox queue mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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 Base class for all ChromeVox widgets. 6 * @fileoverview Base class for all ChromeVox widgets.
7 * 7 *
8 * Widgets are keyboard driven and modal mediums for ChromeVox to expose 8 * Widgets are keyboard driven and modal mediums for ChromeVox to expose
9 * additional features such as lists, interactive search, or grids. 9 * additional features such as lists, interactive search, or grids.
10 */ 10 */
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 window.removeEventListener('keypress', this.onKeyPress, true); 109 window.removeEventListener('keypress', this.onKeyPress, true);
110 window.removeEventListener('keydown', this.onKeyDown, true); 110 window.removeEventListener('keydown', this.onKeyDown, true);
111 cvox.ChromeVox.stickyOverride = null; 111 cvox.ChromeVox.stickyOverride = null;
112 112
113 cvox.ChromeVox.earcons.playEarcon(cvox.AbstractEarcons.OBJECT_CLOSE); 113 cvox.ChromeVox.earcons.playEarcon(cvox.AbstractEarcons.OBJECT_CLOSE);
114 if (!opt_noSync) { 114 if (!opt_noSync) {
115 this.initialNode = this.initialNode.nodeType == 1 ? 115 this.initialNode = this.initialNode.nodeType == 1 ?
116 this.initialNode : this.initialNode.parentNode; 116 this.initialNode : this.initialNode.parentNode;
117 cvox.ApiImplementation.syncToNode(this.initialNode, 117 cvox.ApiImplementation.syncToNode(this.initialNode,
118 true, 118 true,
119 cvox.AbstractTts.QUEUE_MODE_QUEUE); 119 cvox.QueueMode.QUEUE);
120 } 120 }
121 121
122 this.active = false; 122 this.active = false;
123 }; 123 };
124 124
125 125
126 /** 126 /**
127 * Toggle between showing and hiding. 127 * Toggle between showing and hiding.
128 */ 128 */
129 cvox.Widget.prototype.toggle = function() { 129 cvox.Widget.prototype.toggle = function() {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 */ 186 */
187 cvox.Widget.prototype.onKeyPress = function(evt) { 187 cvox.Widget.prototype.onKeyPress = function(evt) {
188 return false; 188 return false;
189 }; 189 };
190 /** 190 /**
191 * @return {boolean} True if any widget is currently active. 191 * @return {boolean} True if any widget is currently active.
192 */ 192 */
193 cvox.Widget.isActive = function() { 193 cvox.Widget.isActive = function() {
194 return (cvox.Widget.ref_ && cvox.Widget.ref_.isActive()) || false; 194 return (cvox.Widget.ref_ && cvox.Widget.ref_.isActive()) || false;
195 }; 195 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698