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

Unified Diff: chrome/browser/resources/keyboard_overlay_accessibility_helper.js

Issue 8687012: Moved ChromeOS-specific resources from chrome/browser/resources to chrome/browser/resources/chrom... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/keyboard_overlay.js ('k') | chrome/browser/resources/keyboard_overlay_data.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/keyboard_overlay_accessibility_helper.js
===================================================================
--- chrome/browser/resources/keyboard_overlay_accessibility_helper.js (revision 111700)
+++ chrome/browser/resources/keyboard_overlay_accessibility_helper.js (working copy)
@@ -1,40 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// An object to implement keyboard overlay accessiblity.
-var KeyboardOverlayAccessibilityHelper = {
- // Returns true when ChromeVox is loaded and active, false otherwise.
- cvoxIsActive: function() {
- return window.cvox && window.cvox.Api.isChromeVoxActive();
- },
- // Speaks all the shortcut with the given modifiers.
- maybeSpeakAllShortcuts: function(modifiers) {
- if (!this.cvoxIsActive())
- return;
- cvox.Api.stop();
- var keyboardGlyphData = getKeyboardGlyphData();
- var shortcutData = getShortcutData();
- var layout = getLayouts()[keyboardGlyphData.layoutName];
- var keysToShortcutText = {};
- for (var i = 0; i < layout.length; ++i) {
- var identifier = remapIdentifier(layout[i][0]);
- var keyData = keyboardGlyphData.keys[identifier];
- var keyLabel = getKeyLabel(keyData, modifiers);
- var shortcutId = shortcutData[getAction(keyLabel, modifiers)];
- var shortcutText = templateData[shortcutId];
- var keysText = modifiers.concat(keyLabel).join(' + ');
- if (shortcutText)
- keysToShortcutText[keysText] = shortcutText;
- }
- for (var keysText in keysToShortcutText) {
- this.speakShortcut_(keysText, keysToShortcutText[keysText]);
- }
- },
- // Speaks given shortcut description.
- speakShortcut_: function(keysText, shortcutText) {
- keysText = keysText.toLowerCase(); // For correct pronunciation.
- cvox.Api.speak(keysText, 1, {});
- cvox.Api.speak(shortcutText, 1, {});
- },
-};
« no previous file with comments | « chrome/browser/resources/keyboard_overlay.js ('k') | chrome/browser/resources/keyboard_overlay_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698