Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/session/session_state_observer.h" | 10 #include "ash/session/session_state_observer.h" |
| 11 #include "ash/shell_observer.h" | 11 #include "ash/shell_observer.h" |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/callback_list.h" | 13 #include "base/callback_list.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/prefs/pref_change_registrar.h" | 15 #include "base/prefs/pref_change_registrar.h" |
| 16 #include "base/scoped_observer.h" | 16 #include "base/scoped_observer.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 18 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 19 #include "chrome/browser/chromeos/accessibility/chromevox_panel.h" | |
| 19 #include "chrome/browser/extensions/api/braille_display_private/braille_controll er.h" | 20 #include "chrome/browser/extensions/api/braille_display_private/braille_controll er.h" |
| 20 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
| 22 #include "extensions/browser/event_router.h" | 23 #include "extensions/browser/event_router.h" |
| 23 #include "extensions/browser/extension_system.h" | 24 #include "extensions/browser/extension_system.h" |
| 24 #include "ui/base/ime/chromeos/input_method_manager.h" | 25 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 25 #include "ui/chromeos/accessibility_types.h" | 26 #include "ui/chromeos/accessibility_types.h" |
| 26 | 27 |
| 27 namespace content { | 28 namespace content { |
| 28 class RenderViewHost; | 29 class RenderViewHost; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 AccessibilityStatusEventDetails& details); | 194 AccessibilityStatusEventDetails& details); |
| 194 | 195 |
| 195 // Notify accessibility when locale changes occur. | 196 // Notify accessibility when locale changes occur. |
| 196 void OnLocaleChanged(); | 197 void OnLocaleChanged(); |
| 197 | 198 |
| 198 // Plays an earcon. Earcons are brief and distinctive sounds that indicate | 199 // Plays an earcon. Earcons are brief and distinctive sounds that indicate |
| 199 // when their mapped event has occurred. The sound key enums can be found in | 200 // when their mapped event has occurred. The sound key enums can be found in |
| 200 // chromeos/audio/chromeos_sounds.h. | 201 // chromeos/audio/chromeos_sounds.h. |
| 201 void PlayEarcon(int sound_key); | 202 void PlayEarcon(int sound_key); |
| 202 | 203 |
| 204 // Get work area insets due to accessibility overlays on one of the | |
| 205 // screen edges. | |
| 206 gfx::Insets GetWorkAreaInsets(aura::Window* root_window) const; | |
| 207 | |
| 203 // Profile having the a11y context. | 208 // Profile having the a11y context. |
| 204 Profile* profile() { return profile_; } | 209 Profile* profile() { return profile_; } |
| 205 | 210 |
| 206 protected: | 211 protected: |
| 207 AccessibilityManager(); | 212 AccessibilityManager(); |
| 208 ~AccessibilityManager() override; | 213 ~AccessibilityManager() override; |
| 209 | 214 |
| 210 private: | 215 private: |
| 211 void LoadChromeVox(); | 216 void LoadChromeVox(); |
| 212 void LoadChromeVoxToUserScreen(const base::Closure& done_cb); | 217 void LoadChromeVoxToUserScreen(const base::Closure& done_cb); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 bool system_sounds_enabled_; | 291 bool system_sounds_enabled_; |
| 287 | 292 |
| 288 AccessibilityStatusCallbackList callback_list_; | 293 AccessibilityStatusCallbackList callback_list_; |
| 289 | 294 |
| 290 bool braille_display_connected_; | 295 bool braille_display_connected_; |
| 291 ScopedObserver<extensions::api::braille_display_private::BrailleController, | 296 ScopedObserver<extensions::api::braille_display_private::BrailleController, |
| 292 AccessibilityManager> scoped_braille_observer_; | 297 AccessibilityManager> scoped_braille_observer_; |
| 293 | 298 |
| 294 bool braille_ime_current_; | 299 bool braille_ime_current_; |
| 295 | 300 |
| 301 ChromeVoxPanel* chromevox_panel_; | |
|
oshima
2015/11/05 23:58:50
document ownership
| |
| 302 | |
| 296 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; | 303 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; |
| 297 | 304 |
| 298 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); | 305 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); |
| 299 }; | 306 }; |
| 300 | 307 |
| 301 } // namespace chromeos | 308 } // namespace chromeos |
| 302 | 309 |
| 303 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 310 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |