OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_BASE_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_BASE_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_BASE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 TextInputType GetTextInputType() const override; | 50 TextInputType GetTextInputType() const override; |
51 TextInputMode GetTextInputMode() const override; | 51 TextInputMode GetTextInputMode() const override; |
52 int GetTextInputFlags() const override; | 52 int GetTextInputFlags() const override; |
53 bool CanComposeInline() const override; | 53 bool CanComposeInline() const override; |
54 void ShowImeIfNeeded() override; | 54 void ShowImeIfNeeded() override; |
55 | 55 |
56 void AddObserver(InputMethodObserver* observer) override; | 56 void AddObserver(InputMethodObserver* observer) override; |
57 void RemoveObserver(InputMethodObserver* observer) override; | 57 void RemoveObserver(InputMethodObserver* observer) override; |
58 | 58 |
| 59 InputMethodLogCollector* GetLogCollector() override; |
| 60 |
59 protected: | 61 protected: |
60 virtual void OnWillChangeFocusedClient(TextInputClient* focused_before, | 62 virtual void OnWillChangeFocusedClient(TextInputClient* focused_before, |
61 TextInputClient* focused) {} | 63 TextInputClient* focused) {} |
62 virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, | 64 virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, |
63 TextInputClient* focused) {} | 65 TextInputClient* focused) {} |
64 | 66 |
65 // Returns true if |client| is currently focused. | 67 // Returns true if |client| is currently focused. |
66 bool IsTextInputClientFocused(const TextInputClient* client); | 68 bool IsTextInputClientFocused(const TextInputClient* client); |
67 | 69 |
68 // Checks if the focused text input client's text input type is | 70 // Checks if the focused text input client's text input type is |
(...skipping 25 matching lines...) Expand all Loading... |
94 private: | 96 private: |
95 void SetFocusedTextInputClientInternal(TextInputClient* client); | 97 void SetFocusedTextInputClientInternal(TextInputClient* client); |
96 | 98 |
97 internal::InputMethodDelegate* delegate_; | 99 internal::InputMethodDelegate* delegate_; |
98 TextInputClient* text_input_client_; | 100 TextInputClient* text_input_client_; |
99 | 101 |
100 base::ObserverList<InputMethodObserver> observer_list_; | 102 base::ObserverList<InputMethodObserver> observer_list_; |
101 | 103 |
102 bool system_toplevel_window_focused_; | 104 bool system_toplevel_window_focused_; |
103 | 105 |
| 106 scoped_ptr<InputMethodLogCollector> log_collector_; |
| 107 |
104 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); | 108 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); |
105 }; | 109 }; |
106 | 110 |
107 } // namespace ui | 111 } // namespace ui |
108 | 112 |
109 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ | 113 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ |
OLD | NEW |