Commit 878de580 authored by oka@chromium.org's avatar oka@chromium.org Committed by Commit Bot

Remove OnTextInputTypeChanged, which is only called by mock.

Bug: 739988
Change-Id: Ic484a862e25700611581989f6e660267a01a2cbe
Reviewed-on: https://chromium-review.googlesource.com/562844
Commit-Queue: Keigo Oka <oka@chromium.org>
Reviewed-by: default avatarShu Chen <shuchen@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486261}
parent 987ca527
......@@ -221,7 +221,6 @@ class MagnificationControllerImpl : public MagnificationController,
void OnMoveMagnifierTimer();
// ui::InputMethodObserver:
void OnTextInputTypeChanged(const ui::TextInputClient* client) override {}
void OnFocus() override {}
void OnBlur() override {}
void OnTextInputStateChanged(const ui::TextInputClient* client) override {}
......
......@@ -59,7 +59,6 @@ class AccessibilityHighlightManager
const content::NotificationDetails& details) override;
// ui::InputMethodObserver overrides:
void OnTextInputTypeChanged(const ui::TextInputClient* client) override {}
void OnFocus() override {}
void OnBlur() override {}
void OnInputMethodDestroyed(const ui::InputMethod* input_method) override {}
......
......@@ -73,14 +73,6 @@ ui::TextInputClient* TextInputTestHelper::GetTextInputClient() const {
return GetInputMethod()->GetTextInputClient();
}
void TextInputTestHelper::OnTextInputTypeChanged(
const ui::TextInputClient* client) {
latest_text_input_type_ =
client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
if (waiting_type_ == WAIT_ON_TEXT_INPUT_TYPE_CHANGED)
base::MessageLoop::current()->QuitWhenIdle();
}
void TextInputTestHelper::OnShowImeIfNeeded() {
}
......@@ -116,6 +108,10 @@ void TextInputTestHelper::OnCaretBoundsChanged(
void TextInputTestHelper::OnTextInputStateChanged(
const ui::TextInputClient* client) {
latest_text_input_type_ =
client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
if (waiting_type_ == WAIT_ON_TEXT_INPUT_TYPE_CHANGED)
base::MessageLoop::current()->QuitWhenIdle();
}
void TextInputTestHelper::WaitForTextInputStateChanged(
......
......@@ -73,7 +73,6 @@ class TextInputTestHelper : public ui::InputMethodObserver {
};
// ui::InputMethodObserver overrides.
void OnTextInputTypeChanged(const ui::TextInputClient* client) override;
void OnFocus() override;
void OnBlur() override;
void OnCaretBoundsChanged(const ui::TextInputClient* client) override;
......
......@@ -201,22 +201,11 @@ class InputMethodObserverAura : public TestInputMethodObserver,
return ui::TEXT_INPUT_TYPE_NONE;
}
void SetOnTextInputTypeChangedCallback(
const base::Closure& callback) override {
on_text_input_type_changed_callback_ = callback;
}
void SetOnShowImeIfNeededCallback(const base::Closure& callback) override {
on_show_ime_if_needed_callback_ = callback;
}
private:
// ui::InputMethodObserver implementations.
void OnTextInputTypeChanged(const ui::TextInputClient* client) override {
text_input_client_ = client;
on_text_input_type_changed_callback_.Run();
}
void OnFocus() override {}
void OnBlur() override {}
void OnCaretBoundsChanged(const ui::TextInputClient* client) override {}
......@@ -227,7 +216,6 @@ class InputMethodObserverAura : public TestInputMethodObserver,
ui::InputMethod* input_method_;
const ui::TextInputClient* text_input_client_;
base::Closure on_text_input_type_changed_callback_;
base::Closure on_show_ime_if_needed_callback_;
DISALLOW_COPY_AND_ASSIGN(InputMethodObserverAura);
......
......@@ -215,8 +215,6 @@ class TestInputMethodObserver {
virtual ui::TextInputType GetTextInputTypeFromClient() = 0;
virtual void SetOnTextInputTypeChangedCallback(
const base::Closure& callback) = 0;
virtual void SetOnShowImeIfNeededCallback(const base::Closure& callback) = 0;
protected:
......
......@@ -179,7 +179,6 @@ class MockInputMethodObserver : public InputMethodObserver {
~MockInputMethodObserver() override {}
private:
void OnTextInputTypeChanged(const TextInputClient* client) override {}
void OnFocus() override {}
void OnBlur() override {}
void OnCaretBoundsChanged(const TextInputClient* client) override {}
......
......@@ -16,10 +16,6 @@ class UI_BASE_IME_EXPORT InputMethodObserver {
public:
virtual ~InputMethodObserver() {}
// Called whenever the text input type is changed for the focused client.
// Currently only used by the mock input method for testing.
virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0;
// Called when the top-level system window gets keyboard focus. Currently
// only used by the mock input method for testing.
virtual void OnFocus() = 0;
......
......@@ -63,8 +63,6 @@ bool MockInputMethod::OnUntranslatedIMEMessage(const base::NativeEvent& event,
}
void MockInputMethod::OnTextInputTypeChanged(const TextInputClient* client) {
for (InputMethodObserver& observer : observer_list_)
observer.OnTextInputTypeChanged(client);
for (InputMethodObserver& observer : observer_list_)
observer.OnTextInputStateChanged(client);
}
......
......@@ -182,7 +182,6 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
void OnCaretBoundsChanged(const ui::TextInputClient* client) override {}
void OnFocus() override {}
void OnInputMethodDestroyed(const ui::InputMethod* input_method) override {}
void OnTextInputTypeChanged(const ui::TextInputClient* client) override {}
void OnTextInputStateChanged(const ui::TextInputClient* client) override;
void OnShowImeIfNeeded() override;
......
......@@ -959,16 +959,6 @@ LRESULT HWNDMessageHandler::OnWndProc(UINT message,
return result;
}
void HWNDMessageHandler::OnTextInputTypeChanged(
const ui::TextInputClient* client) {
if (!client || client->GetTextInputType() == ui::TEXT_INPUT_TYPE_NONE) {
DestroyAXSystemCaret();
return;
}
OnCaretBoundsChanged(client);
}
void HWNDMessageHandler::OnFocus() {}
void HWNDMessageHandler::OnBlur() {}
......
......@@ -232,7 +232,6 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) override;
// Overridden from InputMethodObserver
void OnTextInputTypeChanged(const ui::TextInputClient* client) override;
void OnFocus() override;
void OnBlur() override;
void OnCaretBoundsChanged(const ui::TextInputClient* client) override;
......
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