#include "base/time/time.h"
#include "chrome/browser/chromeos/accessibility/accessibility_util.h"
#include "chrome/browser/extensions/api/braille_display_private/braille_controller.h"
-#include "chrome/browser/extensions/extension_system.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "extensions/browser/event_router.h"
+#include "extensions/browser/extension_system.h"
+namespace content {
+class RenderViewHost;
+}
class Profile;
namespace chromeos {
// watching profile notifications and pref-changes.
// TODO(yoshiki): merge MagnificationManager with AccessibilityManager.
class AccessibilityManager : public content::NotificationObserver,
- public extensions::EventRouter::Observer,
extensions::api::braille_display_private::BrailleObserver,
public ash::SessionStateObserver {
public:
// Returns true when the accessibility menu should be shown.
bool ShouldShowAccessibilityMenu();
+ // Returns true when cursor compositing should be enabled.
+ bool ShouldEnableCursorCompositing();
+
// Enables or disables the large cursor.
void EnableLargeCursor(bool enabled);
// Returns true if the large cursor is enabled, or false if not.
// Returns the autoclick delay in milliseconds.
int GetAutoclickDelay() const;
+ // Enables or disables the virtual keyboard.
+ void EnableVirtualKeyboard(bool enabled);
+ // Returns true if the virtual keyboard is enabled, otherwise false.
+ bool IsVirtualKeyboardEnabled();
+
// SessionStateObserver overrides:
virtual void ActiveUserChanged(const std::string& user_id) OVERRIDE;
// Initiates play of shutdown sound and returns it's duration.
base::TimeDelta PlayShutdownSound();
+ // Injects ChromeVox scripts into given |render_view_host|.
+ void InjectChromeVox(content::RenderViewHost* render_view_host);
+
protected:
AccessibilityManager();
virtual ~AccessibilityManager();
void LoadChromeVoxToLockScreen();
void UnloadChromeVox();
void UnloadChromeVoxFromLockScreen();
- void SetUpPreLoadChromeVox(Profile* profile);
- void TearDownPostUnloadChromeVox(Profile* profile);
+ void PostLoadChromeVox(Profile* profile);
+ void PostUnloadChromeVox(Profile* profile);
void UpdateLargeCursorFromPref();
void UpdateStickyKeysFromPref();
void UpdateHighContrastFromPref();
void UpdateAutoclickFromPref();
void UpdateAutoclickDelayFromPref();
+ void UpdateVirtualKeyboardFromPref();
void LocalePrefChanged();
void CheckBrailleState();
const extensions::api::braille_display_private::DisplayState&
display_state) OVERRIDE;
- // EventRouter::Observer implementation.
- virtual void OnListenerAdded(
- const extensions::EventListenerInfo& details) OVERRIDE;
- virtual void OnListenerRemoved(
- const extensions::EventListenerInfo& details) OVERRIDE;
-
// Profile which has the current a11y context.
Profile* profile_;
bool chrome_vox_loaded_on_lock_screen_;
bool chrome_vox_loaded_on_user_screen_;
- // Set of profiles ChromeVox is loaded to.
- std::set<Profile*> chromevox_profiles_;
-
content::NotificationRegistrar notification_registrar_;
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;
scoped_ptr<PrefChangeRegistrar> local_state_pref_change_registrar_;
PrefHandler high_contrast_pref_handler_;
PrefHandler autoclick_pref_handler_;
PrefHandler autoclick_delay_pref_handler_;
+ PrefHandler virtual_keyboard_pref_handler_;
bool large_cursor_enabled_;
bool sticky_keys_enabled_;
bool high_contrast_enabled_;
bool autoclick_enabled_;
int autoclick_delay_ms_;
+ bool virtual_keyboard_enabled_;
ash::AccessibilityNotificationVisibility spoken_feedback_notification_;