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

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

Issue 2703663002: Display images in multiline Braille (Closed)
Patch Set: Final feedback Created 3 years, 9 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 getCurrentRange: function() { 390 getCurrentRange: function() {
391 if (this.currentRange_ && this.currentRange_.isValid()) 391 if (this.currentRange_ && this.currentRange_.isValid())
392 return this.currentRange_; 392 return this.currentRange_;
393 return null; 393 return null;
394 }, 394 },
395 395
396 /** 396 /**
397 * @override 397 * @override
398 */ 398 */
399 setCurrentRange: function(newRange) { 399 setCurrentRange: function(newRange) {
400 // Clear anything that was frozen on the braille display whenever
401 // the user navigates.
402 cvox.ChromeVox.braille.thaw();
403
400 if (newRange && !newRange.isValid()) 404 if (newRange && !newRange.isValid())
401 return; 405 return;
402 406
403 this.currentRange_ = newRange; 407 this.currentRange_ = newRange;
404 var oldMode = this.mode_; 408 var oldMode = this.mode_;
405 var newMode = this.getMode(); 409 var newMode = this.getMode();
406 if (oldMode != newMode) { 410 if (oldMode != newMode) {
407 this.onModeChanged_(newMode, oldMode); 411 this.onModeChanged_(newMode, oldMode);
408 this.mode_ = newMode; 412 this.mode_ = newMode;
409 } 413 }
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 return new RegExp('^(' + globs.map(function(glob) { 850 return new RegExp('^(' + globs.map(function(glob) {
847 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 851 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
848 .replace(/\*/g, '.*') 852 .replace(/\*/g, '.*')
849 .replace(/\?/g, '.'); 853 .replace(/\?/g, '.');
850 }).join('|') + ')$'); 854 }).join('|') + ')$');
851 }; 855 };
852 856
853 new Background(); 857 new Background();
854 858
855 }); // goog.scope 859 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698