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

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

Issue 2813743002: Switch to selected 8-dot braille table in email and url text fields (Closed)
Patch Set: Fixes corner cases (liblouis callbacks sometimes drop when called quickly). Created 3 years, 8 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 */ 386 */
387 setCurrentRange: function(newRange) { 387 setCurrentRange: function(newRange) {
388 // Clear anything that was frozen on the braille display whenever 388 // Clear anything that was frozen on the braille display whenever
389 // the user navigates. 389 // the user navigates.
390 cvox.ChromeVox.braille.thaw(); 390 cvox.ChromeVox.braille.thaw();
391 391
392 if (newRange && !newRange.isValid()) 392 if (newRange && !newRange.isValid())
393 return; 393 return;
394 394
395 this.currentRange_ = newRange; 395 this.currentRange_ = newRange;
396 ChromeVoxState.observers.forEach(function(observer) {
397 observer.onCurrentRangeChanged(newRange);
398 });
396 var oldMode = this.mode_; 399 var oldMode = this.mode_;
397 var newMode = this.getMode(); 400 var newMode = this.getMode();
398 if (oldMode != newMode) { 401 if (oldMode != newMode) {
399 this.onModeChanged_(newMode, oldMode); 402 this.onModeChanged_(newMode, oldMode);
400 this.mode_ = newMode; 403 this.mode_ = newMode;
401 } 404 }
402 405
403 if (this.currentRange_) { 406 if (this.currentRange_) {
404 var start = this.currentRange_.start.node; 407 var start = this.currentRange_.start.node;
405 start.makeVisible(); 408 start.makeVisible();
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 return new RegExp('^(' + globs.map(function(glob) { 830 return new RegExp('^(' + globs.map(function(glob) {
828 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 831 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
829 .replace(/\*/g, '.*') 832 .replace(/\*/g, '.*')
830 .replace(/\?/g, '.'); 833 .replace(/\?/g, '.');
831 }).join('|') + ')$'); 834 }).join('|') + ')$');
832 }; 835 };
833 836
834 new Background(); 837 new Background();
835 838
836 }); // goog.scope 839 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698