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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 2007863004: Fix the double-tap to click gesture in touch accessibility mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO for second display Created 4 years, 6 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 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 'components=UI>accessibility&' + 155 'components=UI>accessibility&' +
156 'description='; 156 'description=';
157 157
158 /** 158 /**
159 * Map from gesture names (AXGesture defined in ui/accessibility/ax_enums.idl) 159 * Map from gesture names (AXGesture defined in ui/accessibility/ax_enums.idl)
160 * to commands when in Classic mode. 160 * to commands when in Classic mode.
161 * @type {Object<string, string>} 161 * @type {Object<string, string>}
162 * @const 162 * @const
163 */ 163 */
164 Background.GESTURE_CLASSIC_COMMAND_MAP = { 164 Background.GESTURE_CLASSIC_COMMAND_MAP = {
165 'click': 'forceClickOnCurrentItem',
165 'swipeUp1': 'backward', 166 'swipeUp1': 'backward',
166 'swipeDown1': 'forward', 167 'swipeDown1': 'forward',
167 'swipeLeft1': 'left', 168 'swipeLeft1': 'left',
168 'swipeRight1': 'right', 169 'swipeRight1': 'right',
169 'swipeUp2': 'jumpToTop', 170 'swipeUp2': 'jumpToTop',
170 'swipeDown2': 'readFromhere', 171 'swipeDown2': 'readFromHere',
171 }; 172 };
172 173
173 /** 174 /**
174 * Map from gesture names (AXGesture defined in ui/accessibility/ax_enums.idl) 175 * Map from gesture names (AXGesture defined in ui/accessibility/ax_enums.idl)
175 * to commands when in Classic mode. 176 * to commands when in Classic mode.
176 * @type {Object<string, string>} 177 * @type {Object<string, string>}
177 * @const 178 * @const
178 */ 179 */
179 Background.GESTURE_NEXT_COMMAND_MAP = { 180 Background.GESTURE_NEXT_COMMAND_MAP = {
181 'click': 'forceClickOnCurrentItem',
180 'swipeUp1': 'previousLine', 182 'swipeUp1': 'previousLine',
181 'swipeDown1': 'nextLine', 183 'swipeDown1': 'nextLine',
182 'swipeLeft1': 'previousObject', 184 'swipeLeft1': 'previousObject',
183 'swipeRight1': 'nextObject', 185 'swipeRight1': 'nextObject',
184 'swipeUp2': 'jumpToTop', 186 'swipeUp2': 'jumpToTop',
185 'swipeDown2': 'readFromHere', 187 'swipeDown2': 'readFromHere',
186 }; 188 };
187 189
188 Background.prototype = { 190 Background.prototype = {
189 __proto__: ChromeVoxState.prototype, 191 __proto__: ChromeVoxState.prototype,
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 1126 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
1125 .replace(/\*/g, '.*') 1127 .replace(/\*/g, '.*')
1126 .replace(/\?/g, '.'); 1128 .replace(/\?/g, '.');
1127 }).join('|') + ')$'); 1129 }).join('|') + ')$');
1128 }; 1130 };
1129 1131
1130 /** @type {Background} */ 1132 /** @type {Background} */
1131 global.backgroundObj = new Background(); 1133 global.backgroundObj = new Background();
1132 1134
1133 }); // goog.scope 1135 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698