Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: ui/base/ime/mock_input_method.cc

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: makes trybots green. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/ime/mock_input_method.cc
diff --git a/ui/base/ime/mock_input_method.cc b/ui/base/ime/mock_input_method.cc
index 340c0d6da6056c28fb80dbbadfb66f3fd1554bfa..6a93643ba7cea77029e42ada64d58fdd9c171856 100644
--- a/ui/base/ime/mock_input_method.cc
+++ b/ui/base/ime/mock_input_method.cc
@@ -4,13 +4,15 @@
#include "ui/base/ime/mock_input_method.h"
+#include "ui/base/ime/input_method_delegate.h"
#include "ui/base/ime/text_input_focus_manager.h"
#include "ui/base/ui_base_switches_util.h"
+#include "ui/events/event.h"
namespace ui {
MockInputMethod::MockInputMethod(internal::InputMethodDelegate* delegate)
- : text_input_client_(NULL) {
+ : text_input_client_(NULL), delegate_(delegate) {
}
MockInputMethod::~MockInputMethod() {
@@ -19,6 +21,7 @@ MockInputMethod::~MockInputMethod() {
}
void MockInputMethod::SetDelegate(internal::InputMethodDelegate* delegate) {
+ delegate_ = delegate;
}
void MockInputMethod::SetFocusedTextInputClient(TextInputClient* client) {
@@ -46,7 +49,7 @@ TextInputClient* MockInputMethod::GetTextInputClient() const {
}
bool MockInputMethod::DispatchKeyEvent(const ui::KeyEvent& event) {
- return false;
+ return delegate_->DispatchKeyEventPostIME(event);
}
void MockInputMethod::OnFocus() {

Powered by Google App Engine
This is Rietveld 408576698