| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_BASE_IME_CHROMEOS_IME_KEYBOARD_X11_H_ | 5 #ifndef UI_BASE_IME_CHROMEOS_IME_KEYBOARD_X11_H_ |
| 6 #define UI_BASE_IME_CHROMEOS_IME_KEYBOARD_X11_H_ | 6 #define UI_BASE_IME_CHROMEOS_IME_KEYBOARD_X11_H_ |
| 7 | 7 |
| 8 #include "ui/base/ime/chromeos/ime_keyboard.h" | 8 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 9 | 9 |
| 10 #include <cstdlib> | 10 #include <cstdlib> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "base/sys_info.h" | 25 #include "base/sys_info.h" |
| 26 #include "base/threading/thread_checker.h" | 26 #include "base/threading/thread_checker.h" |
| 27 #include "ui/base/ui_base_export.h" | 27 #include "ui/base/ui_base_export.h" |
| 28 | 28 |
| 29 namespace chromeos { | 29 namespace chromeos { |
| 30 namespace input_method { | 30 namespace input_method { |
| 31 | 31 |
| 32 class UI_BASE_EXPORT ImeKeyboardX11 : public ImeKeyboard { | 32 class UI_BASE_EXPORT ImeKeyboardX11 : public ImeKeyboard { |
| 33 public: | 33 public: |
| 34 ImeKeyboardX11(); | 34 ImeKeyboardX11(); |
| 35 virtual ~ImeKeyboardX11(); | 35 ~ImeKeyboardX11() override; |
| 36 | 36 |
| 37 // ImeKeyboard: | 37 // ImeKeyboard: |
| 38 virtual bool SetCurrentKeyboardLayoutByName( | 38 bool SetCurrentKeyboardLayoutByName(const std::string& layout_name) override; |
| 39 const std::string& layout_name) override; | 39 bool ReapplyCurrentKeyboardLayout() override; |
| 40 virtual bool ReapplyCurrentKeyboardLayout() override; | 40 void ReapplyCurrentModifierLockStatus() override; |
| 41 virtual void ReapplyCurrentModifierLockStatus() override; | 41 void DisableNumLock() override; |
| 42 virtual void DisableNumLock() override; | 42 void SetCapsLockEnabled(bool enable_caps_lock) override; |
| 43 virtual void SetCapsLockEnabled(bool enable_caps_lock) override; | 43 bool CapsLockIsEnabled() override; |
| 44 virtual bool CapsLockIsEnabled() override; | 44 bool SetAutoRepeatEnabled(bool enabled) override; |
| 45 virtual bool SetAutoRepeatEnabled(bool enabled) override; | 45 bool GetAutoRepeatEnabled() override; |
| 46 virtual bool GetAutoRepeatEnabled() override; | 46 bool SetAutoRepeatRate(const AutoRepeatRate& rate) override; |
| 47 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) override; | |
| 48 | 47 |
| 49 private: | 48 private: |
| 50 // Returns a mask for Num Lock (e.g. 1U << 4). Returns 0 on error. | 49 // Returns a mask for Num Lock (e.g. 1U << 4). Returns 0 on error. |
| 51 unsigned int GetNumLockMask(); | 50 unsigned int GetNumLockMask(); |
| 52 | 51 |
| 53 // Sets the caps-lock status. Note that calling this function always disables | 52 // Sets the caps-lock status. Note that calling this function always disables |
| 54 // the num-lock. | 53 // the num-lock. |
| 55 void SetLockedModifiers(); | 54 void SetLockedModifiers(); |
| 56 | 55 |
| 57 // This function is used by SetLayout() and RemapModifierKeys(). Calls | 56 // This function is used by SetLayout() and RemapModifierKeys(). Calls |
| (...skipping 22 matching lines...) Expand all Loading... |
| 80 base::WeakPtrFactory<ImeKeyboardX11> weak_factory_; | 79 base::WeakPtrFactory<ImeKeyboardX11> weak_factory_; |
| 81 | 80 |
| 82 DISALLOW_COPY_AND_ASSIGN(ImeKeyboardX11); | 81 DISALLOW_COPY_AND_ASSIGN(ImeKeyboardX11); |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 | 84 |
| 86 } // namespace input_method | 85 } // namespace input_method |
| 87 } // namespace chromeos | 86 } // namespace chromeos |
| 88 | 87 |
| 89 #endif // UI_BASE_IME_CHROMEOS_IME_KEYBOARD_X11_H_ | 88 #endif // UI_BASE_IME_CHROMEOS_IME_KEYBOARD_X11_H_ |
| OLD | NEW |