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

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

Issue 2626683002: Revert of Make helpful announcement when there's no focus (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ChromeVox commands. 6 * @fileoverview ChromeVox commands.
7 */ 7 */
8 8
9 goog.provide('CommandHandler'); 9 goog.provide('CommandHandler');
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 (new PanelCommand(PanelCommandType.TUTORIAL)).send(); 188 (new PanelCommand(PanelCommandType.TUTORIAL)).send();
189 return false; 189 return false;
190 case 'showNextUpdatePage': 190 case 'showNextUpdatePage':
191 (new PanelCommand(PanelCommandType.UPDATE_NOTES)).send(); 191 (new PanelCommand(PanelCommandType.UPDATE_NOTES)).send();
192 return false; 192 return false;
193 default: 193 default:
194 break; 194 break;
195 } 195 }
196 196
197 // Require a current range. 197 // Require a current range.
198 if (!ChromeVoxState.instance.currentRange_ || 198 if (!ChromeVoxState.instance.currentRange_)
199 !ChromeVoxState.instance.currentRange_.isValid()) { 199 return true;
200 cvox.ChromeVox.tts.speak(Msgs.getMsg('no_focus'), cvox.QueueMode.FLUSH);
201 return false;
202 }
203 200
204 // Next/classic compat commands hereafter. 201 // Next/classic compat commands hereafter.
205 if (ChromeVoxState.instance.mode == ChromeVoxMode.CLASSIC || 202 if (ChromeVoxState.instance.mode == ChromeVoxMode.CLASSIC ||
206 ChromeVoxState.instance.mode == ChromeVoxMode.NEXT_COMPAT) 203 ChromeVoxState.instance.mode == ChromeVoxMode.NEXT_COMPAT)
207 return true; 204 return true;
208 205
209 var current = ChromeVoxState.instance.currentRange_; 206 var current = ChromeVoxState.instance.currentRange_;
210 var dir = Dir.FORWARD; 207 var dir = Dir.FORWARD;
211 var pred = null; 208 var pred = null;
212 var predErrorMsg = undefined; 209 var predErrorMsg = undefined;
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 break; 768 break;
772 } 769 }
773 if (announcement) { 770 if (announcement) {
774 cvox.ChromeVox.tts.speak( 771 cvox.ChromeVox.tts.speak(
775 announcement, cvox.QueueMode.FLUSH, 772 announcement, cvox.QueueMode.FLUSH,
776 cvox.AbstractTts.PERSONALITY_ANNOTATION); 773 cvox.AbstractTts.PERSONALITY_ANNOTATION);
777 } 774 }
778 }; 775 };
779 776
780 }); // goog.scope 777 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698