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

Unified Diff: views/ime/input_method_win.cc

Issue 6823055: Consolidate OnKeyEvent and InputMethod code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor X2Event handling, nix Windows InputMethodDelegate, etc. Created 9 years, 8 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: views/ime/input_method_win.cc
diff --git a/views/ime/input_method_win.cc b/views/ime/input_method_win.cc
index f720f0591964f5fc2eb5945147f1af3a7e026549..1811773c75a2b3f71c38f94ab439a4d5eda835f8 100644
--- a/views/ime/input_method_win.cc
+++ b/views/ime/input_method_win.cc
@@ -12,11 +12,10 @@
namespace views {
-InputMethodWin::InputMethodWin(internal::InputMethodDelegate* delegate)
+InputMethodWin::InputMethodWin()
: active_(false),
direction_(base::i18n::UNKNOWN_DIRECTION),
pending_requested_direction_(base::i18n::UNKNOWN_DIRECTION) {
- set_delegate(delegate);
}
InputMethodWin::~InputMethodWin() {
@@ -43,7 +42,7 @@ void InputMethodWin::OnBlur() {
InputMethodBase::OnBlur();
}
-void InputMethodWin::DispatchKeyEvent(const KeyEvent& key) {
+bool InputMethodWin::OnKeyEvent(const KeyEvent& key) {
// Handles ctrl-shift key to change text direction and layout alignment.
if (ui::ImeInput::IsRTLKeyboardLayoutInstalled() && !IsTextInputTypeNone()) {
ui::KeyboardCode code = key.key_code();
@@ -63,8 +62,7 @@ void InputMethodWin::DispatchKeyEvent(const KeyEvent& key) {
pending_requested_direction_ = base::i18n::UNKNOWN_DIRECTION;
}
}
-
- DispatchKeyEventPostIME(key);
+ return false;
}
void InputMethodWin::OnTextInputTypeChanged(View* view) {

Powered by Google App Engine
This is Rietveld 408576698