Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 789 description['Version'] = chrome.app.getDetails().version; | 789 description['Version'] = chrome.app.getDetails().version; |
| 790 description['Reproduction Steps'] = '%0a1.%0a2.%0a3.'; | 790 description['Reproduction Steps'] = '%0a1.%0a2.%0a3.'; |
| 791 for (var key in description) | 791 for (var key in description) |
| 792 url += key + ':%20' + description[key] + '%0a'; | 792 url += key + ':%20' + description[key] + '%0a'; |
| 793 chrome.tabs.create({url: url}); | 793 chrome.tabs.create({url: url}); |
| 794 return false; | 794 return false; |
| 795 case 'toggleBrailleCaptions': | 795 case 'toggleBrailleCaptions': |
| 796 cvox.BrailleCaptionsBackground.setActive( | 796 cvox.BrailleCaptionsBackground.setActive( |
| 797 !cvox.BrailleCaptionsBackground.isEnabled()); | 797 !cvox.BrailleCaptionsBackground.isEnabled()); |
| 798 return false; | 798 return false; |
| 799 case 'help': | |
|
David Tseng
2016/06/29 20:59:43
Shoudl this be called openTutorial?
| |
| 800 (new PanelCommand(PanelCommandType.TUTORIAL)).send(); | |
| 801 return false; | |
| 799 default: | 802 default: |
| 800 return true; | 803 return true; |
| 801 } | 804 } |
| 802 | 805 |
| 803 if (pred) { | 806 if (pred) { |
| 804 var bound = current.getBound(dir).node; | 807 var bound = current.getBound(dir).node; |
| 805 if (bound) { | 808 if (bound) { |
| 806 var node = AutomationUtil.findNextNode( | 809 var node = AutomationUtil.findNextNode( |
| 807 bound, dir, pred, {skipInitialAncestry: true}); | 810 bound, dir, pred, {skipInitialAncestry: true}); |
| 808 | 811 |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1231 return new RegExp('^(' + globs.map(function(glob) { | 1234 return new RegExp('^(' + globs.map(function(glob) { |
| 1232 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') | 1235 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') |
| 1233 .replace(/\*/g, '.*') | 1236 .replace(/\*/g, '.*') |
| 1234 .replace(/\?/g, '.'); | 1237 .replace(/\?/g, '.'); |
| 1235 }).join('|') + ')$'); | 1238 }).join('|') + ')$'); |
| 1236 }; | 1239 }; |
| 1237 | 1240 |
| 1238 new Background(); | 1241 new Background(); |
| 1239 | 1242 |
| 1240 }); // goog.scope | 1243 }); // goog.scope |
| OLD | NEW |