#ifndef ASH_ACCESSIBILITY_ACCESSIBILITY_CONTROLLER_H_
#define ASH_ACCESSIBILITY_ACCESSIBILITY_CONTROLLER_H_
#include <array>
#include <memory>
#include <optional>
#include <string>
#include "ash/accessibility/a11y_feature_type.h"
#include "ash/accessibility/accessibility_notification_controller.h"
#include "ash/ash_export.h"
#include "ash/constants/ash_constants.h"
#include "ash/public/cpp/accelerator_actions.h"
#include "ash/public/cpp/input_device_settings_controller.h"
#include "ash/public/cpp/session/session_observer.h"
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/scoped_observation.h"
#include "base/time/time.h"
#include "ui/display/display_observer.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/geometry/rect.h"
class PrefChangeRegistrar;
class PrefRegistrySimple;
class PrefService;
namespace aura {
class Window;
}
namespace ax {
namespace mojom {
enum class Gesture;
}
}
namespace display {
enum class TabletState;
}
namespace gfx {
class Point;
class PointF;
struct VectorIcon;
}
namespace ash {
class AccessibilityConfirmationDialog;
class AccessibilityControllerClient;
class AccessibilityEventRewriter;
class AccessibilityFeatureDisableDialog;
class AccessibilityHighlightController;
class AccessibilityObserver;
enum class AccessibilityPanelState;
enum class DictationToggleSource;
class DictationBubbleController;
enum class DictationBubbleHintType;
enum class DictationBubbleIconType;
enum class DictationNotificationType;
class DisableTouchpadEventRewriter;
enum class DisableTouchpadMode;
class DragEventRewriter;
class FaceGazeBubbleController;
class FilterKeysEventRewriter;
class FlashScreenController;
class FloatingAccessibilityController;
class PointScanController;
class ScopedBacklightsForcedOff;
class SelectToSpeakEventHandler;
class SelectToSpeakEventHandlerDelegate;
class SelectToSpeakMenuBubbleController;
enum class SelectToSpeakState;
enum class Sound;
class SwitchAccessMenuBubbleController;
enum AccessibilityNotificationVisibility {
A11Y_NOTIFICATION_NONE,
A11Y_NOTIFICATION_SHOW,
};
enum class A11yNotificationType {
kNone,
kSpokenFeedbackEnabled,
kBrailleDisplayConnected,
kDictationAllDlcsDownloaded,
kDictationNoDlcsDownloaded,
kDicationOnlyPumpkinDownloaded,
kDictationOnlySodaDownloaded,
kFaceGazeActive,
kFaceGazeAssetsDownloaded,
kFaceGazeAssetsFailed,
kSpokenFeedbackBrailleEnabled,
kSwitchAccessEnabled,
kTouchpadDisabled,
};
class ASH_EXPORT AccessibilityController
: public SessionObserver,
public display::DisplayObserver,
public InputDeviceSettingsController::Observer {
public:
class Feature {
public:
Feature(A11yFeatureType type,
const std::string& pref_name,
const gfx::VectorIcon* icon,
const int name_resource_id,
const bool toggleable_in_quicksettings,
AccessibilityController* controller);
Feature(const Feature&) = delete;
Feature& operator=(Feature const&) = delete;
virtual ~Feature();
A11yFeatureType type() const { return type_; }
virtual void SetEnabled(bool enabled);
bool enabled() const { return enabled_; }
bool IsVisibleInTray() const;
bool IsEnterpriseIconVisible() const;
const std::string& pref_name() const { return pref_name_; }
const gfx::VectorIcon& icon() const;
int name_resource_id() const { return name_resource_id_; }
bool toggleable_in_quicksettings() const {
return toggleable_in_quicksettings_;
}
A11yFeatureType conflicting_feature() const { return conflicting_feature_; }
void UpdateFromPref();
void SetConflictingFeature(A11yFeatureType feature);
void ObserveConflictingFeature();
void LogDurationMetric();
protected:
const A11yFeatureType type_;
A11yFeatureType conflicting_feature_ =
A11yFeatureType::kNoConflictingFeature;
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
bool enabled_ = false;
const std::string pref_name_;
raw_ptr<const gfx::VectorIcon> icon_;
const int name_resource_id_;
const bool toggleable_in_quicksettings_;
base::Time enabled_time_;
const raw_ptr<AccessibilityController> owner_;
};
class FeatureWithDialog : public Feature {
public:
FeatureWithDialog(A11yFeatureType type,
const std::string& pref_name,
const gfx::VectorIcon* icon,
const int name_resource_id,
const bool toggleable_in_quicksettings,
const std::string& dialog_pref_name,
AccessibilityController* controller);
~FeatureWithDialog() override;
void SetDialogAccepted();
bool WasDialogAccepted() const;
private:
const std::string dialog_pref_;
};
struct A11yNotificationWrapper {
A11yNotificationWrapper();
A11yNotificationWrapper(A11yNotificationType type_in,
const std::string& notification_id_in,
std::vector<std::u16string> replacements_in);
A11yNotificationWrapper(
A11yNotificationType type_in,
const std::string& notification_id_in,
std::vector<std::u16string> replacements_in,
std::optional<base::RepeatingCallback<void(std::optional<int>)>>
callback_in);
~A11yNotificationWrapper();
A11yNotificationWrapper(const A11yNotificationWrapper&);
A11yNotificationType type = A11yNotificationType::kNone;
std::string notification_id;
std::vector<std::u16string> replacements;
std::optional<base::RepeatingCallback<void(std::optional<int>)>> callback;
};
static AccessibilityController* Get();
AccessibilityController();
AccessibilityController(const AccessibilityController&) = delete;
AccessibilityController& operator=(const AccessibilityController&) = delete;
~AccessibilityController() override;
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
void Shutdown();
void AddObserver(AccessibilityObserver* observer);
void RemoveObserver(AccessibilityObserver* observer);
Feature& GetFeature(A11yFeatureType feature) const;
std::vector<Feature*> GetEnabledFeaturesInQuickSettings() const;
base::WeakPtr<AccessibilityController> GetWeakPtr();
Feature& always_show_scrollbar() const;
Feature& autoclick() const;
Feature& bounce_keys() const;
Feature& caret_highlight() const;
Feature& color_correction() const;
Feature& cursor_color() const;
Feature& cursor_highlight() const;
Feature& dictation() const;
Feature& disable_touchpad() const;
Feature& face_gaze() const;
Feature& flash_notifications() const;
Feature& floating_menu() const;
Feature& focus_highlight() const;
Feature& large_cursor() const;
Feature& live_caption() const;
Feature& mono_audio() const;
Feature& mouse_keys() const;
Feature& reduced_animations() const;
Feature& spoken_feedback() const;
Feature& select_to_speak() const;
Feature& slow_keys() const;
Feature& sticky_keys() const;
Feature& switch_access() const;
Feature& virtual_keyboard() const;
FeatureWithDialog& docked_magnifier() const;
FeatureWithDialog& fullscreen_magnifier() const;
FeatureWithDialog& high_contrast() const;
void SetDisplayRotationAcceleratorDialogBeenAccepted();
bool HasDisplayRotationAcceleratorDialogBeenAccepted() const;
bool IsAutoclickSettingVisibleInTray();
bool IsEnterpriseIconVisibleForAutoclick();
void SetAutoclickEventType(AutoclickEventType event_type);
AutoclickEventType GetAutoclickEventType();
void SetAutoclickMenuPosition(FloatingMenuPosition position);
FloatingMenuPosition GetAutoclickMenuPosition();
void RequestAutoclickScrollableBoundsForPoint(
const gfx::Point& point_in_screen);
void MagnifierBoundsChanged(const gfx::Rect& bounds_in_screen);
void SetFloatingMenuPosition(FloatingMenuPosition position);
FloatingMenuPosition GetFloatingMenuPosition();
FloatingAccessibilityController* GetFloatingMenuController();
PointScanController* GetPointScanController();
void UpdateFloatingPanelBoundsIfNeeded();
void UpdateAutoclickMenuBoundsIfNeeded();
bool IsCaretHighlightSettingVisibleInTray();
bool IsEnterpriseIconVisibleForCaretHighlight();
bool IsCursorHighlightSettingVisibleInTray();
bool IsEnterpriseIconVisibleForCursorHighlight();
bool IsDictationSettingVisibleInTray();
bool IsEnterpriseIconVisibleForDictation();
bool IsFaceGazeSettingVisibleInTray();
bool IsEnterpriseIconVisibleForFaceGaze();
bool IsFocusHighlightSettingVisibleInTray();
bool IsEnterpriseIconVisibleForFocusHighlight();
bool IsFullScreenMagnifierSettingVisibleInTray();
bool IsEnterpriseIconVisibleForFullScreenMagnifier();
bool IsDockedMagnifierSettingVisibleInTray();
bool IsEnterpriseIconVisibleForDockedMagnifier();
bool IsHighContrastSettingVisibleInTray();
bool IsEnterpriseIconVisibleForHighContrast();
bool IsColorCorrectionSettingVisibleInTray();
bool IsEnterpriseIconVisibleForColorCorrection();
bool IsLargeCursorSettingVisibleInTray();
bool IsEnterpriseIconVisibleForLargeCursor();
bool IsLiveCaptionSettingVisibleInTray();
bool IsEnterpriseIconVisibleForLiveCaption();
bool IsMonoAudioSettingVisibleInTray();
bool IsEnterpriseIconVisibleForMonoAudio();
void SetSpokenFeedbackEnabled(bool enabled,
AccessibilityNotificationVisibility notify);
bool IsSpokenFeedbackSettingVisibleInTray();
bool IsEnterpriseIconVisibleForSpokenFeedback();
bool IsSelectToSpeakSettingVisibleInTray();
bool IsEnterpriseIconVisibleForSelectToSpeak();
void RequestSelectToSpeakStateChange();
SelectToSpeakState GetSelectToSpeakState() const;
bool IsStickyKeysSettingVisibleInTray();
bool IsEnterpriseIconVisibleForStickyKeys();
bool IsReducedAnimationsSettingVisibleInTray();
bool IsEnterpriseIconVisibleForReducedAnimations();
bool IsTouchpadDisabled();
void OnFaceGazeActiveNotificationClicked(std::optional<int> button_index);
void OnTouchpadNotificationClicked(std::optional<int> button_index);
bool IsSwitchAccessRunning() const;
bool IsSwitchAccessSettingVisibleInTray();
bool IsEnterpriseIconVisibleForSwitchAccess();
void SetAccessibilityEventRewriter(
AccessibilityEventRewriter* accessibility_event_rewriter);
void SetDisableTouchpadEventRewriter(DisableTouchpadEventRewriter* rewriter);
void EnableInternalTouchpad();
DisableTouchpadMode GetDisableTouchpadMode();
void SetFilterKeysEventRewriter(FilterKeysEventRewriter* rewriter);
bool IsPointScanEnabled();
bool IsVirtualKeyboardSettingVisibleInTray();
bool IsEnterpriseIconVisibleForVirtualKeyboard();
void SetTabletModeShelfNavigationButtonsEnabled(bool enabled);
bool tablet_mode_shelf_navigation_buttons_enabled() const {
return tablet_mode_shelf_navigation_buttons_enabled_;
}
void ShowFloatingMenuIfEnabled();
bool dictation_active() const { return dictation_active_; }
bool accessibility_shortcuts_enabled() const { return shortcuts_enabled_; }
void TriggerAccessibilityAlert(AccessibilityAlert alert);
void TriggerAccessibilityAlertWithMessage(const std::string& message);
void PlayEarcon(Sound sound_key);
base::TimeDelta PlayShutdownSound();
void HandleAccessibilityGesture(ax::mojom::Gesture gesture,
gfx::PointF location);
void ToggleDictation();
bool ShouldToggleSpokenFeedbackViaTouch() const;
void PlaySpokenFeedbackToggleCountdown(int tick_count);
bool IsEnterpriseIconVisibleInTrayMenu(const std::string& path);
bool IsPrimarySettingsViewVisibleInTray();
void StartPointScanning();
void SetA11yOverrideWindow(aura::Window* a11y_override_window);
void SetClient(AccessibilityControllerClient* client);
void SetDarkenScreen(bool darken);
void BrailleDisplayStateChanged(bool connected);
void SetFocusHighlightRect(const gfx::Rect& bounds_in_screen);
void SetCaretBounds(const gfx::Rect& bounds_in_screen);
void SetAccessibilityPanelAlwaysVisible(bool always_visible);
void SetAccessibilityPanelBounds(const gfx::Rect& bounds,
AccessibilityPanelState state);
void SetSelectToSpeakState(SelectToSpeakState state);
void SetSelectToSpeakEventHandlerDelegate(
SelectToSpeakEventHandlerDelegate* delegate);
void ShowSelectToSpeakPanel(const gfx::Rect& anchor,
bool is_paused,
double speech_rate);
void HideSelectToSpeakPanel();
void OnSelectToSpeakPanelAction(SelectToSpeakPanelAction action,
double value);
void HideSwitchAccessBackButton();
void HideSwitchAccessMenu();
void ShowSwitchAccessBackButton(const gfx::Rect& anchor);
void ShowSwitchAccessMenu(const gfx::Rect& anchor,
std::vector<std::string> actions_to_show);
void StartPointScan();
void StopPointScan();
void SetPointScanSpeedDipsPerSecond(int point_scan_speed_dips_per_second);
void SetDictationActive(bool is_active);
void ToggleDictationFromSource(DictationToggleSource source);
void EnableSelectToSpeakWithDialog();
void DisableTouchpadWithDialog();
void EnableOrToggleDictationFromSource(DictationToggleSource source);
void ShowDictationLanguageUpgradedNudge(
const std::string& dictation_locale,
const std::string& application_locale);
void HandleAutoclickScrollableBoundsFound(const gfx::Rect& bounds_in_screen);
std::u16string GetBatteryDescription() const;
void SetVirtualKeyboardVisible(bool is_visible);
void ToggleMouseKeys();
void PerformAccessibilityAction();
void PerformAcceleratorAction(AcceleratorAction accelerator_action);
void NotifyAccessibilityStatusChanged();
bool IsAccessibilityFeatureVisibleInTrayMenu(const std::string& path);
void DisablePolicyRecommendationRestorerForTesting();
void SuspendSwitchAccessKeyHandling(bool suspend);
void EnableChromeVoxVolumeSlideGesture();
void UpdateDictationButtonOnSpeechRecognitionDownloadChanged(
int download_progress);
void ShowNotificationForDictation(DictationNotificationType type,
const std::u16string& display_language);
void UpdateDictationBubble(
bool visible,
DictationBubbleIconType icon,
const std::optional<std::u16string>& text,
const std::optional<std::vector<DictationBubbleHintType>>& hints);
void UpdateFaceGazeBubble(const std::u16string& text, bool is_warning);
void ShowNotificationForFaceGaze(FaceGazeNotificationType type);
void SilenceSpokenFeedback();
std::optional<ui::KeyboardCode> GetCaretBrowsingActionKey();
void ShowToast(AccessibilityToastType type);
void ShowConfirmationDialog(
const std::u16string& title,
const std::u16string& description,
const std::u16string& confirm_name,
const std::u16string& cancel_name,
base::OnceClosure on_accept_callback,
base::OnceClosure on_cancel_callback,
base::OnceClosure on_close_callback,
std::optional<int> timeout_seconds = std::nullopt);
gfx::Rect GetConfirmationDialogBoundsInScreen();
void ShowFeatureDisableDialog(int window_title_text_id,
base::OnceClosure on_accept_callback,
base::OnceClosure on_cancel_callback);
void PreviewFlashNotification() const;
void OnSigninScreenPrefServiceInitialized(PrefService* prefs) override;
void OnActiveUserPrefServiceChanged(PrefService* prefs) override;
void OnSessionStateChanged(session_manager::SessionState state) override;
void OnMouseConnected(const mojom::Mouse& mouse) override;
void OnTouchpadConnected(const mojom::Touchpad& touchpad) override;
AccessibilityEventRewriter* GetAccessibilityEventRewriterForTest();
DisableTouchpadEventRewriter* GetDisableTouchpadEventRewriterForTest();
FilterKeysEventRewriter* GetFilterKeysEventRewriterForTest();
SwitchAccessMenuBubbleController* GetSwitchAccessBubbleControllerForTest() {
return switch_access_bubble_controller_.get();
}
void DisableAutoClickConfirmationDialogForTest();
void DisableSwitchAccessDisableConfirmationDialogTesting();
void DisableSwitchAccessEnableNotificationTesting();
SelectToSpeakMenuBubbleController*
GetSelectToSpeakMenuBubbleControllerForTest() {
return select_to_speak_bubble_controller_.get();
}
AccessibilityConfirmationDialog* GetConfirmationDialogForTest() {
return confirmation_dialog_.get();
}
AccessibilityFeatureDisableDialog* GetFeatureDisableDialogForTest() {
return disable_dialog_.get();
}
bool enable_chromevox_volume_slide_gesture() {
return enable_chromevox_volume_slide_gesture_;
}
int dictation_soda_download_progress() {
return dictation_soda_download_progress_;
}
DictationBubbleController* GetDictationBubbleControllerForTest();
FaceGazeBubbleController* GetFaceGazeBubbleControllerForTest();
DragEventRewriter* GetDragEventRewriterForTest() const {
return drag_event_rewriter_.get();
}
bool IsDictationKeyboardDialogShowingForTesting() {
return dictation_keyboard_dialog_showing_for_testing_;
}
void AcceptDictationKeyboardDialogForTesting() {
OnDictationKeyboardDialogAccepted();
}
void DismissDictationKeyboardDialogForTesting() {
OnDictationKeyboardDialogDismissed();
}
void AcceptDisableTouchpadDialogForTesting() {
OnDisableTouchpadDialogAccepted();
}
void DismissDisableTouchpadDialogForTesting() {
OnDisableTouchpadDialogDismissed();
}
void AddShowToastCallbackForTesting(
base::RepeatingCallback<void(AccessibilityToastType)> callback);
void AddShowConfirmationDialogCallbackForTesting(
base::RepeatingCallback<void()> callback);
void AddFeatureDisableDialogCallbackForTesting(
base::RepeatingCallback<void()> callback);
bool VerifyFeaturesDataForTesting();
SelectToSpeakEventHandler* GetSelectToSpeakEventHandlerForTesting() const {
return select_to_speak_event_handler_.get();
}
FlashScreenController* GetFlashScreenControllerForTesting() const {
return flash_screen_controller_.get();
}
void SetVirtualKeyboardVisibleCallbackForTesting(
base::RepeatingCallback<void()> callback);
void ScrollAtPoint(const gfx::Point& target,
AccessibilityScrollDirection direction);
void ObserveInputDeviceSettings();
void StopObservingInputDeviceSettings() {
input_device_settings_observer_.Reset();
}
void EnableDragEventRewriter(bool enabled);
void RequestDisableFaceGaze();
private:
void CreateAccessibilityFeatures();
void OnFeatureChanged(A11yFeatureType feature);
void OnDisplayTabletStateChanged(display::TabletState state) override;
void ObservePrefs(PrefService* prefs);
void UpdateFeatureFromPref(A11yFeatureType feature);
void UpdateAutoclickDelayFromPref();
void UpdateAutoclickEventTypeFromPref();
void UpdateAutoclickRevertToLeftClickFromPref();
void UpdateAutoclickStabilizePositionFromPref();
void UpdateAutoclickMovementThresholdFromPref();
void UpdateAutoclickMenuPositionFromPref();
void UpdateBounceKeysDelayFromPref();
void UpdateSlowKeysDelayFromPref();
void UpdateMouseKeysDisableInTextFieldsFromPref();
void UpdateMouseKeysAccelerationFromPref();
void UpdateMouseKeysMaxSpeedFromPref();
void UpdateMouseKeysUsePrimaryKeysFromPref();
void UpdateMouseKeysDominantHandFromPref();
void UpdateFloatingMenuPositionFromPref();
void UpdateLargeCursorFromPref();
void UpdateLiveCaptionFromPref();
void UpdateCursorColorFromPrefs(bool notify);
void UpdateFaceGazeFromPrefs();
void UpdateFlashNotificationsFromPrefs();
void UpdateDisableTouchpadFromPrefs(bool notify);
void UpdateColorCorrectionFromPrefs();
void UpdateCaretBlinkIntervalFromPrefs() const;
void UpdateUseOverlayScrollbarFromPref() const;
void UpdateSwitchAccessKeyCodesFromPref(SwitchAccessCommand command);
void UpdateSwitchAccessAutoScanEnabledFromPref();
void UpdateSwitchAccessAutoScanSpeedFromPref();
void UpdateSwitchAccessAutoScanKeyboardSpeedFromPref();
void UpdateSwitchAccessPointScanSpeedFromPref();
void UpdateAccessibilityHighlightingFromPrefs();
void UpdateShortcutsEnabledFromPref();
void UpdateTabletModeShelfNavigationButtonsFromPref();
void SwitchAccessDisableDialogClosed(bool disable_dialog_accepted);
void MaybeCreateSelectToSpeakEventHandler();
void ActivateSwitchAccess();
void DeactivateSwitchAccess();
void SyncSwitchAccessPrefsToSignInProfile();
void UpdateKeyCodesAfterSwitchAccessEnabled();
void ShowDictationKeyboardDialog();
void OnDictationKeyboardDialogAccepted();
void OnDictationKeyboardDialogDismissed();
void ShowSelectToSpeakKeyboardDialog();
void OnSelectToSpeakKeyboardDialogAccepted();
void OnSelectToSpeakKeyboardDialogDismissed();
void ShowDisableTouchpadDialog();
void OnDisableTouchpadDialogAccepted();
void OnDisableTouchpadDialogDismissed();
void ExternalDeviceConnected();
void OnFaceGazeSentinelChanged(const std::string& sentinel_pref,
const std::string& behavior_pref);
void OnFaceGazeDisableDialogClosed(const std::string& sentinel_pref,
const std::string& behavior_pref,
bool dialog_accepted);
void OnRequestDisableFaceGazeAction(bool dialog_accepted);
void RecordSelectToSpeakSpeechDuration(SelectToSpeakState old_state,
SelectToSpeakState new_state);
int dictation_soda_download_progress_ = 0;
bool dictation_keyboard_dialog_showing_for_testing_ = false;
raw_ptr<AccessibilityControllerClient> client_ = nullptr;
std::array<std::unique_ptr<Feature>, kA11yFeatureTypeCount> features_;
base::TimeDelta autoclick_delay_;
int large_cursor_size_in_dip_ = kDefaultLargeCursorSize;
bool dictation_active_ = false;
bool shortcuts_enabled_ = true;
bool tablet_mode_shelf_navigation_buttons_enabled_ = false;
SelectToSpeakState select_to_speak_state_ =
SelectToSpeakState::kSelectToSpeakStateInactive;
std::unique_ptr<SelectToSpeakEventHandler> select_to_speak_event_handler_;
raw_ptr<SelectToSpeakEventHandlerDelegate>
select_to_speak_event_handler_delegate_ = nullptr;
std::unique_ptr<SelectToSpeakMenuBubbleController>
select_to_speak_bubble_controller_;
std::vector<int> switch_access_keys_to_capture_;
std::unique_ptr<SwitchAccessMenuBubbleController>
switch_access_bubble_controller_;
raw_ptr<AccessibilityEventRewriter> accessibility_event_rewriter_ = nullptr;
raw_ptr<DisableTouchpadEventRewriter> disable_touchpad_event_rewriter_ =
nullptr;
raw_ptr<FilterKeysEventRewriter> filter_keys_event_rewriter_ = nullptr;
bool no_auto_click_confirmation_dialog_for_testing_ = false;
bool no_switch_access_disable_confirmation_dialog_for_testing_ = false;
bool switch_access_disable_dialog_showing_ = false;
bool skip_switch_access_notification_ = false;
base::RepeatingCallback<void()> set_virtual_keyboard_visible_callback_;
std::unique_ptr<AccessibilityHighlightController>
accessibility_highlight_controller_;
std::unique_ptr<FloatingAccessibilityController> floating_menu_controller_;
bool always_show_floating_menu_when_enabled_ = false;
std::unique_ptr<PointScanController> point_scan_controller_;
std::unique_ptr<ScopedBacklightsForcedOff> scoped_backlights_forced_off_;
std::unique_ptr<DictationBubbleController> dictation_bubble_controller_;
std::unique_ptr<FaceGazeBubbleController> facegaze_bubble_controller_;
std::unique_ptr<DragEventRewriter> drag_event_rewriter_;
std::unique_ptr<AccessibilityNotificationController>
accessibility_notification_controller_;
std::unique_ptr<FlashScreenController> flash_screen_controller_;
bool enable_chromevox_volume_slide_gesture_ = false;
base::ObserverList<AccessibilityObserver> observers_;
raw_ptr<PrefService> active_user_prefs_ = nullptr;
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
base::WeakPtr<AccessibilityConfirmationDialog> confirmation_dialog_;
base::RepeatingCallback<void()>
show_confirmation_dialog_callback_for_testing_;
base::WeakPtr<AccessibilityFeatureDisableDialog> disable_dialog_;
base::RepeatingCallback<void()> show_disable_dialog_callback_for_testing_;
base::Time select_to_speak_speech_start_time_;
base::ScopedObservation<InputDeviceSettingsController,
InputDeviceSettingsController::Observer>
input_device_settings_observer_{this};
base::WeakPtrFactory<AccessibilityController> weak_ptr_factory_{this};
};
}
#endif