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 #include "ui/base/ime/input_method_base.h" | 5 #include "ui/base/ime/input_method_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "ui/base/ime/input_method_delegate.h" | 10 #include "ui/base/ime/input_method_delegate.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 bool InputMethodBase::CanComposeInline() const { | 88 bool InputMethodBase::CanComposeInline() const { |
89 TextInputClient* client = GetTextInputClient(); | 89 TextInputClient* client = GetTextInputClient(); |
90 return client ? client->CanComposeInline() : true; | 90 return client ? client->CanComposeInline() : true; |
91 } | 91 } |
92 | 92 |
93 void InputMethodBase::ShowImeIfNeeded() { | 93 void InputMethodBase::ShowImeIfNeeded() { |
94 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnShowImeIfNeeded()); | 94 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnShowImeIfNeeded()); |
95 } | 95 } |
96 | 96 |
| 97 bool InputMethodBase::SupportsOnScreenKeyboard() const { |
| 98 return false; |
| 99 } |
| 100 |
| 101 void InputMethodBase::NotifyKeyboardBoundsUnchanged() { |
| 102 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, |
| 103 OnKeyboardBoundsUnchanged()); |
| 104 } |
| 105 |
97 void InputMethodBase::AddObserver(InputMethodObserver* observer) { | 106 void InputMethodBase::AddObserver(InputMethodObserver* observer) { |
98 observer_list_.AddObserver(observer); | 107 observer_list_.AddObserver(observer); |
99 } | 108 } |
100 | 109 |
101 void InputMethodBase::RemoveObserver(InputMethodObserver* observer) { | 110 void InputMethodBase::RemoveObserver(InputMethodObserver* observer) { |
102 observer_list_.RemoveObserver(observer); | 111 observer_list_.RemoveObserver(observer); |
103 } | 112 } |
104 | 113 |
105 bool InputMethodBase::IsTextInputClientFocused(const TextInputClient* client) { | 114 bool InputMethodBase::IsTextInputClientFocused(const TextInputClient* client) { |
106 return client && (client == GetTextInputClient()); | 115 return client && (client == GetTextInputClient()); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (TextInputClient* text_input_client = GetTextInputClient()) | 188 if (TextInputClient* text_input_client = GetTextInputClient()) |
180 text_input_client->OnCandidateWindowUpdated(); | 189 text_input_client->OnCandidateWindowUpdated(); |
181 } | 190 } |
182 | 191 |
183 void InputMethodBase::CandidateWindowHiddenCallback() { | 192 void InputMethodBase::CandidateWindowHiddenCallback() { |
184 if (TextInputClient* text_input_client = GetTextInputClient()) | 193 if (TextInputClient* text_input_client = GetTextInputClient()) |
185 text_input_client->OnCandidateWindowHidden(); | 194 text_input_client->OnCandidateWindowHidden(); |
186 } | 195 } |
187 | 196 |
188 } // namespace ui | 197 } // namespace ui |
OLD | NEW |