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

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

Issue 2238613002: Support output for Chrome's native find in ChromeVox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@text_markers
Patch Set: Don't forget to bit shift in SendTreeChanges (checking against cached overall tree filter). Created 4 years, 4 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');
11 11
12 goog.require('AutomationPredicate'); 12 goog.require('AutomationPredicate');
13 goog.require('AutomationUtil'); 13 goog.require('AutomationUtil');
14 goog.require('BackgroundKeyboardHandler'); 14 goog.require('BackgroundKeyboardHandler');
15 goog.require('ChromeVoxState'); 15 goog.require('ChromeVoxState');
16 goog.require('CommandHandler'); 16 goog.require('CommandHandler');
17 goog.require('FindHandler');
17 goog.require('LiveRegions'); 18 goog.require('LiveRegions');
18 goog.require('NextEarcons'); 19 goog.require('NextEarcons');
19 goog.require('Notifications'); 20 goog.require('Notifications');
20 goog.require('Output'); 21 goog.require('Output');
21 goog.require('Output.EventType'); 22 goog.require('Output.EventType');
22 goog.require('PanelCommand'); 23 goog.require('PanelCommand');
23 goog.require('Stubs'); 24 goog.require('Stubs');
24 goog.require('constants'); 25 goog.require('constants');
25 goog.require('cursors.Cursor'); 26 goog.require('cursors.Cursor');
26 goog.require('cvox.BrailleKeyCommand'); 27 goog.require('cvox.BrailleKeyCommand');
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 /** 228 /**
228 * Handles a mode change. 229 * Handles a mode change.
229 * @param {ChromeVoxMode} newMode 230 * @param {ChromeVoxMode} newMode
230 * @param {?ChromeVoxMode} oldMode Can be null at startup when no range was 231 * @param {?ChromeVoxMode} oldMode Can be null at startup when no range was
231 * previously set. 232 * previously set.
232 * @private 233 * @private
233 */ 234 */
234 onModeChanged_: function(newMode, oldMode) { 235 onModeChanged_: function(newMode, oldMode) {
235 this.keyboardHandler_.onModeChanged(newMode, oldMode); 236 this.keyboardHandler_.onModeChanged(newMode, oldMode);
236 CommandHandler.onModeChanged(newMode, oldMode); 237 CommandHandler.onModeChanged(newMode, oldMode);
238 FindHandler.onModeChanged(newMode, oldMode);
237 Notifications.onModeChange(newMode, oldMode); 239 Notifications.onModeChange(newMode, oldMode);
238 240
239 if (newMode == ChromeVoxMode.CLASSIC) 241 if (newMode == ChromeVoxMode.CLASSIC)
240 chrome.accessibilityPrivate.setFocusRing([]); 242 chrome.accessibilityPrivate.setFocusRing([]);
241 243
242 // note that |this.currentRange_| can *change* because the request is 244 // note that |this.currentRange_| can *change* because the request is
243 // async. Save it to ensure we're looking at the currentRange at this moment 245 // async. Save it to ensure we're looking at the currentRange at this moment
244 // in time. 246 // in time.
245 var cur = this.currentRange_; 247 var cur = this.currentRange_;
246 chrome.tabs.query({active: true, 248 chrome.tabs.query({active: true,
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 return new RegExp('^(' + globs.map(function(glob) { 748 return new RegExp('^(' + globs.map(function(glob) {
747 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 749 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
748 .replace(/\*/g, '.*') 750 .replace(/\*/g, '.*')
749 .replace(/\?/g, '.'); 751 .replace(/\?/g, '.');
750 }).join('|') + ')$'); 752 }).join('|') + ')$');
751 }; 753 };
752 754
753 new Background(); 755 new Background();
754 756
755 }); // goog.scope 757 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698