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 
5 #ifndef ASH_SYSTEM_CAPS_LOCK_NOTIFICATION_CONTROLLER_H_
6 #define ASH_SYSTEM_CAPS_LOCK_NOTIFICATION_CONTROLLER_H_
7 
8 #include "ash/ime/ime_controller_impl.h"
9 #include "base/macros.h"
10 
11 class PrefRegistrySimple;
12 
13 namespace ash {
14 
15 // Controller class to manage caps lock notification.
16 class ASH_EXPORT CapsLockNotificationController
17     : public ImeControllerImpl::Observer {
18  public:
19   CapsLockNotificationController();
20   virtual ~CapsLockNotificationController();
21 
22   static bool IsSearchKeyMappedToCapsLock();
23 
24   // See Shell::RegisterProfilePrefs().
25   static void RegisterProfilePrefs(PrefRegistrySimple* registry, bool for_test);
26 
27   // ImeControllerImpl::Observer:
28   void OnCapsLockChanged(bool enabled) override;
OnKeyboardLayoutNameChanged(const std::string &)29   void OnKeyboardLayoutNameChanged(const std::string&) override {}
30 
31  private:
32   DISALLOW_COPY_AND_ASSIGN(CapsLockNotificationController);
33 };
34 
35 }  // namespace ash
36 
37 #endif  // ASH_SYSTEM_CAPS_LOCK_NOTIFICATION_CONTROLLER_H_
38