| Index: chrome/browser/chromeos/input_method/input_method_engine.cc
|
| diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc
|
| index b9859db24ba612f3b8ff8ceced68b4a4a5083536..d4b95e40f6588486491e76a569693a053ea359f3 100644
|
| --- a/chrome/browser/chromeos/input_method/input_method_engine.cc
|
| +++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
|
| @@ -344,4 +344,27 @@ void InputMethodEngine::MenuItemToProperty(
|
| // TODO(nona): Support item.children.
|
| }
|
|
|
| +void InputMethodEngine::UpdateComposition(
|
| + const ui::CompositionText& composition_text,
|
| + uint32_t cursor_pos,
|
| + bool is_visible) {
|
| + ui::IMEInputContextHandlerInterface* input_context =
|
| + ui::IMEBridge::Get()->GetInputContextHandler();
|
| + if (input_context)
|
| + input_context->UpdateCompositionText(composition_text, cursor_pos,
|
| + is_visible);
|
| +}
|
| +
|
| +void InputMethodEngine::CommitTextToInputContext(int context_id,
|
| + const std::string& text) {
|
| + ui::IMEBridge::Get()->GetInputContextHandler()->CommitText(text);
|
| +
|
| + // Records histograms for committed characters.
|
| + if (!composition_text_->text.empty()) {
|
| + UMA_HISTOGRAM_CUSTOM_COUNTS("InputMethod.CommitLength", text.length(), 1,
|
| + 25, 25);
|
| + composition_text_.reset(new ui::CompositionText());
|
| + }
|
| +}
|
| +
|
| } // namespace chromeos
|
|
|