caps_lock_notification_controller.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_SYSTEM_CAPS_LOCK_NOTIFICATION_CONTROLLER_H_
  5. #define ASH_SYSTEM_CAPS_LOCK_NOTIFICATION_CONTROLLER_H_
  6. #include "ash/ime/ime_controller_impl.h"
  7. class PrefRegistrySimple;
  8. namespace ash {
  9. // Controller class to manage caps lock notification.
  10. class ASH_EXPORT CapsLockNotificationController
  11. : public ImeControllerImpl::Observer {
  12. public:
  13. CapsLockNotificationController();
  14. CapsLockNotificationController(const CapsLockNotificationController&) =
  15. delete;
  16. CapsLockNotificationController& operator=(
  17. const CapsLockNotificationController&) = delete;
  18. virtual ~CapsLockNotificationController();
  19. static bool IsSearchKeyMappedToCapsLock();
  20. // See Shell::RegisterProfilePrefs().
  21. static void RegisterProfilePrefs(PrefRegistrySimple* registry, bool for_test);
  22. // ImeControllerImpl::Observer:
  23. void OnCapsLockChanged(bool enabled) override;
  24. void OnKeyboardLayoutNameChanged(const std::string&) override {}
  25. };
  26. } // namespace ash
  27. #endif // ASH_SYSTEM_CAPS_LOCK_NOTIFICATION_CONTROLLER_H_