Commit e10cfd2e authored by Jing Wang's avatar Jing Wang Committed by Commit Bot

Add click button api to suggestion handler interface

Bug: 1099498
Change-Id: I7ca8fdfbb145332bdb6cda54dbf59c86f7f86104
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2279344
Commit-Queue: Jing Wang <jiwan@chromium.org>
Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785281}
parent aebabdd8
......@@ -47,6 +47,8 @@ class TestSuggestionHandler : public SuggestionHandlerInterface {
return false;
}
void ClickButton(const ui::ime::AssistiveWindowButton& button) override {}
bool AcceptSuggestionCandidate(int context_id,
const base::string16& candidate,
std::string* error) override {
......
......@@ -176,6 +176,11 @@ bool InputMethodEngine::SetButtonHighlighted(
return true;
}
void InputMethodEngine::ClickButton(
const ui::ime::AssistiveWindowButton& button) {
observer_->OnAssistiveWindowButtonClicked(button);
}
bool InputMethodEngine::AcceptSuggestionCandidate(
int context_id,
const base::string16& suggestion,
......
......@@ -127,6 +127,8 @@ class InputMethodEngine : public InputMethodEngineBase,
bool highlighted,
std::string* error) override;
void ClickButton(const ui::ime::AssistiveWindowButton& button) override;
bool AcceptSuggestionCandidate(int context_id,
const base::string16& candidate,
std::string* error) override;
......
......@@ -73,6 +73,8 @@ class TestSuggestionHandler : public SuggestionHandlerInterface {
return false;
}
void ClickButton(const ui::ime::AssistiveWindowButton& button) override {}
bool SetButtonHighlighted(int context_id,
const ui::ime::AssistiveWindowButton& button,
bool highlighted,
......
......@@ -52,6 +52,9 @@ class SuggestionHandlerInterface {
bool highlighted,
std::string* error) = 0;
// Click the given button in assitive window.
virtual void ClickButton(const ui::ime::AssistiveWindowButton& button) = 0;
virtual bool AcceptSuggestionCandidate(int context_id,
const base::string16& candidate,
std::string* error) = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment