Commit a7f84847 authored by My Nguyen's avatar My Nguyen Committed by Commit Bot

[DeleteIt] Remove unused ShowMultipleSuggestions

In AssistiveWindowController, the method is no longer used because
emoji suggester uses SetAssistiveWindowProperties.


Bug: 1102219
Change-Id: I7286bf0e297662bd26e1e7a87116b20f723ae094
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2473778Reviewed-by: default avatarKeith Lee <keithlee@chromium.org>
Commit-Queue: My Nguyen <myy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820656}
parent 9aa50456
......@@ -172,11 +172,6 @@ void AssistiveWindowController::ShowSuggestion(
suggestion_window_view_->Show(details);
}
// TODO(crbug/1102219): Method unused. Remove all definitions and references.
void AssistiveWindowController::ShowMultipleSuggestions(
const std::vector<base::string16>& suggestions) {
}
void AssistiveWindowController::SetButtonHighlighted(
const ui::ime::AssistiveWindowButton& button,
bool highlighted) {
......
......@@ -73,8 +73,6 @@ class AssistiveWindowController : public views::WidgetObserver,
void SetAssistiveWindowProperties(
const AssistiveWindowProperties& window) override;
void ShowSuggestion(const ui::ime::SuggestionDetails& details) override;
void ShowMultipleSuggestions(
const std::vector<base::string16>& suggestions) override;
void SetButtonHighlighted(const ui::ime::AssistiveWindowButton& button,
bool highlighted) override;
void AcceptSuggestion(const base::string16& suggestion) override;
......
......@@ -80,12 +80,6 @@ class TestSuggestionHandler : public SuggestionHandlerInterface {
void OnSuggestionsChanged(
const std::vector<std::string>& suggestions) override {}
bool ShowMultipleSuggestions(int context_id,
const std::vector<base::string16>& candidates,
std::string* error) override {
return false;
}
void ClickButton(const ui::ime::AssistiveWindowButton& button) override {}
bool AcceptSuggestionCandidate(int context_id,
......
......@@ -137,25 +137,6 @@ void InputMethodEngine::OnSuggestionsChanged(
observer_->OnSuggestionsChanged(suggestions);
}
bool InputMethodEngine::ShowMultipleSuggestions(
int context_id,
const std::vector<base::string16>& suggestions,
std::string* error) {
if (!IsActive()) {
*error = kErrorNotActive;
return false;
}
if (context_id != context_id_ || context_id_ == -1) {
*error = kErrorWrongContext;
return false;
}
IMEAssistiveWindowHandlerInterface* aw_handler =
ui::IMEBridge::Get()->GetAssistiveWindowHandler();
if (aw_handler)
aw_handler->ShowMultipleSuggestions(suggestions);
return true;
}
bool InputMethodEngine::SetButtonHighlighted(
int context_id,
const ui::ime::AssistiveWindowButton& button,
......
......@@ -118,10 +118,6 @@ class InputMethodEngine : public InputMethodEngineBase,
void OnSuggestionsChanged(
const std::vector<std::string>& suggestions) override;
bool ShowMultipleSuggestions(int context_id,
const std::vector<base::string16>& suggestions,
std::string* error) override;
bool SetButtonHighlighted(int context_id,
const ui::ime::AssistiveWindowButton& button,
bool highlighted,
......
......@@ -71,12 +71,6 @@ class TestSuggestionHandler : public SuggestionHandlerInterface {
previous_suggestions_ = suggestions;
}
bool ShowMultipleSuggestions(int context_id,
const std::vector<base::string16>& candidates,
std::string* error) override {
return false;
}
void ClickButton(const ui::ime::AssistiveWindowButton& button) override {
button_clicked_ = button.id;
}
......
......@@ -39,11 +39,6 @@ class SuggestionHandlerInterface {
virtual void OnSuggestionsChanged(
const std::vector<std::string>& suggestions) = 0;
virtual bool ShowMultipleSuggestions(
int context_id,
const std::vector<base::string16>& candidates,
std::string* error) = 0;
// Highlights or unhighlights a given assistive button based on the given
// parameters. No-op if context_id doesn't match or engine is not active.
virtual bool SetButtonHighlighted(
......
......@@ -42,9 +42,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS)
virtual void ShowSuggestion(const ui::ime::SuggestionDetails& details) {}
virtual void ShowMultipleSuggestions(
const std::vector<base::string16>& suggestions) {}
// Highlights or unhighlights a given assistive button based on the given
// parameters.
virtual void SetButtonHighlighted(
......
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