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

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

Issue 2108963003: Initial draft of ChromeVox Next tutorial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switched to use showNextUpdatePage 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 // These commands don't require a current range and work in all modes. 401 // These commands don't require a current range and work in all modes.
402 switch (command) { 402 switch (command) {
403 case 'toggleChromeVoxVersion': 403 case 'toggleChromeVoxVersion':
404 if (!this.toggleNext()) 404 if (!this.toggleNext())
405 return false; 405 return false;
406 if (this.currentRange_) 406 if (this.currentRange_)
407 this.navigateToRange(this.currentRange_); 407 this.navigateToRange(this.currentRange_);
408 break; 408 break;
409 case 'showNextUpdatePage': 409 case 'showNextUpdatePage':
410 var nextUpdatePage = {url: 'cvox2/background/next_update.html'}; 410 (new PanelCommand(PanelCommandType.TUTORIAL)).send();
411 chrome.tabs.create(nextUpdatePage);
412 return false; 411 return false;
413 default: 412 default:
414 break; 413 break;
415 } 414 }
416 415
417 // Require a current range. 416 // Require a current range.
418 if (!this.currentRange_) 417 if (!this.currentRange_)
419 return true; 418 return true;
420 419
421 // Next/compat commands hereafter. 420 // Next/compat commands hereafter.
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 return new RegExp('^(' + globs.map(function(glob) { 1229 return new RegExp('^(' + globs.map(function(glob) {
1231 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 1230 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
1232 .replace(/\*/g, '.*') 1231 .replace(/\*/g, '.*')
1233 .replace(/\?/g, '.'); 1232 .replace(/\?/g, '.');
1234 }).join('|') + ')$'); 1233 }).join('|') + ')$');
1235 }; 1234 };
1236 1235
1237 new Background(); 1236 new Background();
1238 1237
1239 }); // goog.scope 1238 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698