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_INPUT_METHOD_MAC_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_MAC_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_MAC_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_MAC_H_ |
7 | 7 |
8 #include "ui/base/ime/input_method_base.h" | 8 #include "ui/base/ime/input_method_base.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 | 11 |
12 // A ui::InputMethod implementation for Mac. | 12 // A ui::InputMethod implementation for Mac. |
13 // On the Mac, key events don't pass through InputMethod. | 13 // On the Mac, key events don't pass through InputMethod. |
14 // Instead, NSTextInputClient calls are bridged to the currently focused | 14 // Instead, NSTextInputClient calls are bridged to the currently focused |
15 // ui::TextInputClient object. | 15 // ui::TextInputClient object. |
16 class UI_BASE_EXPORT InputMethodMac : public InputMethodBase { | 16 class UI_BASE_EXPORT InputMethodMac : public InputMethodBase { |
17 public: | 17 public: |
18 explicit InputMethodMac(internal::InputMethodDelegate* delegate); | 18 explicit InputMethodMac(internal::InputMethodDelegate* delegate); |
19 virtual ~InputMethodMac(); | 19 virtual ~InputMethodMac(); |
20 | 20 |
21 // Overriden from InputMethod. | 21 // Overriden from InputMethod. |
22 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, | 22 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, |
23 NativeEventResult* result) OVERRIDE; | 23 NativeEventResult* result) override; |
24 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE; | 24 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override; |
25 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; | 25 virtual void OnCaretBoundsChanged(const TextInputClient* client) override; |
26 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; | 26 virtual void CancelComposition(const TextInputClient* client) override; |
27 virtual void OnInputLocaleChanged() OVERRIDE; | 27 virtual void OnInputLocaleChanged() override; |
28 virtual std::string GetInputLocale() OVERRIDE; | 28 virtual std::string GetInputLocale() override; |
29 virtual bool IsActive() OVERRIDE; | 29 virtual bool IsActive() override; |
30 virtual bool IsCandidatePopupOpen() const OVERRIDE; | 30 virtual bool IsCandidatePopupOpen() const override; |
31 | 31 |
32 private: | 32 private: |
33 DISALLOW_COPY_AND_ASSIGN(InputMethodMac); | 33 DISALLOW_COPY_AND_ASSIGN(InputMethodMac); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace ui | 36 } // namespace ui |
37 | 37 |
38 #endif // UI_BASE_IME_INPUT_METHOD_MAC_H_ | 38 #endif // UI_BASE_IME_INPUT_METHOD_MAC_H_ |
OLD | NEW |