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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc

Issue 77453013: Add an accessibility alert for incorrect use of some accelerators. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 7 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/app/generated_resources.grd ('k') | chrome/browser/ui/ash/chrome_shell_delegate_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index ed867673a81bb0ebaa5a7a0290e7b6490a7b4e20..ad659e7e9ce7e3427587d67b8c9dabac6e114a37 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -10,6 +10,7 @@
#include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/accessibility/accessibility_events.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
@@ -33,7 +34,9 @@
#include "chromeos/ime/input_method_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
+#include "grit/generated_resources.h"
#include "ui/aura/window.h"
+#include "ui/base/l10n/l10n_util.h"
namespace {
@@ -142,6 +145,28 @@ class AccessibilityDelegateImpl : public ash::AccessibilityDelegate {
return std::numeric_limits<double>::min();
}
+ virtual void TriggerAccessibilityAlert(
+ ash::AccessibilityAlert alert) OVERRIDE {
+ Profile* profile = ProfileManager::GetDefaultProfile();
+ if (profile) {
+ switch (alert) {
+ case ash::A11Y_ALERT_WINDOW_NEEDED: {
+ AccessibilityAlertInfo event(
+ profile, l10n_util::GetStringUTF8(IDS_A11Y_ALERT_WINDOW_NEEDED));
+ SendControlAccessibilityNotification(
+ ui::AccessibilityTypes::EVENT_ALERT, &event);
+ break;
+ }
+ case ash::A11Y_ALERT_NONE:
+ break;
+ }
+ }
+ }
+
+ virtual ash::AccessibilityAlert GetLastAccessibilityAlert() OVERRIDE {
+ return ash::A11Y_ALERT_NONE;
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(AccessibilityDelegateImpl);
};
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/ash/chrome_shell_delegate_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698