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

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

Issue 2123973004: Define a minimum time for double tap in ChromeVox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 4 years, 5 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 this.inExcursion_ = false; 142 this.inExcursion_ = false;
143 143
144 /** 144 /**
145 * Stores the mode as computed the last time a current range was set. 145 * Stores the mode as computed the last time a current range was set.
146 * @type {?ChromeVoxMode} 146 * @type {?ChromeVoxMode}
147 */ 147 */
148 this.mode_ = null; 148 this.mode_ = null;
149 149
150 chrome.accessibilityPrivate.onAccessibilityGesture.addListener( 150 chrome.accessibilityPrivate.onAccessibilityGesture.addListener(
151 this.onAccessibilityGesture_); 151 this.onAccessibilityGesture_);
152 Notifications.onStartup();
153 }; 152 };
154 153
155 /** 154 /**
156 * @const {string} 155 * @const {string}
157 */ 156 */
158 Background.ISSUE_URL = 'https://code.google.com/p/chromium/issues/entry?' + 157 Background.ISSUE_URL = 'https://code.google.com/p/chromium/issues/entry?' +
159 'labels=Type-Bug,Pri-2,cvox2,OS-Chrome&' + 158 'labels=Type-Bug,Pri-2,cvox2,OS-Chrome&' +
160 'components=UI>accessibility&' + 159 'components=UI>accessibility&' +
161 'description='; 160 'description=';
162 161
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 localStorage['useNext'] = useNext; 330 localStorage['useNext'] = useNext;
332 if (useNext) 331 if (useNext)
333 this.setCurrentRangeToFocus_(); 332 this.setCurrentRangeToFocus_();
334 else 333 else
335 this.setCurrentRange(null); 334 this.setCurrentRange(null);
336 335
337 var announce = Msgs.getMsg(useNext ? 336 var announce = Msgs.getMsg(useNext ?
338 'switch_to_next' : 'switch_to_classic'); 337 'switch_to_next' : 'switch_to_classic');
339 cvox.ChromeVox.tts.speak( 338 cvox.ChromeVox.tts.speak(
340 announce, cvox.QueueMode.FLUSH, {doNotInterrupt: true}); 339 announce, cvox.QueueMode.FLUSH, {doNotInterrupt: true});
341 Notifications.onModeChange();
342 340
343 // If the new mode is Classic, return false now so we don't announce 341 // If the new mode is Classic, return false now so we don't announce
344 // anything more. 342 // anything more.
345 return useNext; 343 return useNext;
346 }, 344 },
347 345
348 /** 346 /**
349 * @override 347 * @override
350 */ 348 */
351 getCurrentRange: function() { 349 getCurrentRange: function() {
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 return new RegExp('^(' + globs.map(function(glob) { 1231 return new RegExp('^(' + globs.map(function(glob) {
1234 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 1232 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
1235 .replace(/\*/g, '.*') 1233 .replace(/\*/g, '.*')
1236 .replace(/\?/g, '.'); 1234 .replace(/\?/g, '.');
1237 }).join('|') + ')$'); 1235 }).join('|') + ')$');
1238 }; 1236 };
1239 1237
1240 new Background(); 1238 new Background();
1241 1239
1242 }); // goog.scope 1240 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698