| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_INPUT_METHOD_AURALINUX_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/base/ime/input_method_base.h" | 9 #include "ui/base/ime/input_method_base.h" |
| 10 #include "ui/base/ime/linux/linux_input_method_context.h" | 10 #include "ui/base/ime/linux/linux_input_method_context.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 | 13 |
| 14 // A ui::InputMethod implementation for Aura on Linux platforms. The | 14 // A ui::InputMethod implementation for Aura on Linux platforms. The |
| 15 // implementation details are separated to ui::LinuxInputMethodContext | 15 // implementation details are separated to ui::LinuxInputMethodContext |
| 16 // interface. | 16 // interface. |
| 17 class InputMethodAuraLinux : public InputMethodBase, | 17 class InputMethodAuraLinux : public InputMethodBase, |
| 18 public LinuxInputMethodContextDelegate { | 18 public LinuxInputMethodContextDelegate { |
| 19 public: | 19 public: |
| 20 explicit InputMethodAuraLinux(internal::InputMethodDelegate* delegate); | 20 explicit InputMethodAuraLinux(internal::InputMethodDelegate* delegate); |
| 21 virtual ~InputMethodAuraLinux(); | 21 virtual ~InputMethodAuraLinux(); |
| 22 | 22 |
| 23 // Initializes input methods. This function must be called once prior to | |
| 24 // any use of this instance. This function is supposed to be called from | |
| 25 // ui::InitializeInputMethod(). | |
| 26 static void Initialize(); | |
| 27 | |
| 28 // Overriden from InputMethod. | 23 // Overriden from InputMethod. |
| 29 virtual void Init(bool focused) OVERRIDE; | 24 virtual void Init(bool focused) OVERRIDE; |
| 30 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, | 25 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, |
| 31 NativeEventResult* result) OVERRIDE; | 26 NativeEventResult* result) OVERRIDE; |
| 32 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE; | 27 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE; |
| 33 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; | 28 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; |
| 34 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; | 29 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; |
| 35 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; | 30 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; |
| 36 virtual void OnInputLocaleChanged() OVERRIDE; | 31 virtual void OnInputLocaleChanged() OVERRIDE; |
| 37 virtual std::string GetInputLocale() OVERRIDE; | 32 virtual std::string GetInputLocale() OVERRIDE; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 51 TextInputClient* focused) OVERRIDE; | 46 TextInputClient* focused) OVERRIDE; |
| 52 | 47 |
| 53 scoped_ptr<LinuxInputMethodContext> input_method_context_; | 48 scoped_ptr<LinuxInputMethodContext> input_method_context_; |
| 54 | 49 |
| 55 DISALLOW_COPY_AND_ASSIGN(InputMethodAuraLinux); | 50 DISALLOW_COPY_AND_ASSIGN(InputMethodAuraLinux); |
| 56 }; | 51 }; |
| 57 | 52 |
| 58 } // namespace ui | 53 } // namespace ui |
| 59 | 54 |
| 60 #endif // UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ | 55 #endif // UI_BASE_IME_INPUT_METHOD_AURALINUX_H_ |
| OLD | NEW |