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

Side by Side Diff: ui/base/ime/input_method_base.cc

Issue 2872343003: Remove InputMethodEventHandler. (Closed)
Patch Set: Add a unittest. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/ime/input_method_base.h" 5 #include "ui/base/ime/input_method_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 void InputMethodBase::OnInputMethodChanged() const { 126 void InputMethodBase::OnInputMethodChanged() const {
127 TextInputClient* client = GetTextInputClient(); 127 TextInputClient* client = GetTextInputClient();
128 if (!IsTextInputTypeNone()) 128 if (!IsTextInputTypeNone())
129 client->OnInputMethodChanged(); 129 client->OnInputMethodChanged();
130 } 130 }
131 131
132 ui::EventDispatchDetails InputMethodBase::DispatchKeyEventPostIME( 132 ui::EventDispatchDetails InputMethodBase::DispatchKeyEventPostIME(
133 ui::KeyEvent* event) const { 133 ui::KeyEvent* event) const {
134 ui::EventDispatchDetails details; 134 ui::EventDispatchDetails details;
135 if (delegate_) 135 if (delegate_) {
136 event->set_skip_ime(true);
sadrul 2017/05/15 14:44:24 Instead of turning the flag on here, can WindowTre
Hadi 2017/05/15 17:22:13 Done.
136 details = delegate_->DispatchKeyEventPostIME(event); 137 details = delegate_->DispatchKeyEventPostIME(event);
138 }
137 return details; 139 return details;
138 } 140 }
139 141
140 void InputMethodBase::NotifyTextInputStateChanged( 142 void InputMethodBase::NotifyTextInputStateChanged(
141 const TextInputClient* client) { 143 const TextInputClient* client) {
142 for (InputMethodObserver& observer : observer_list_) 144 for (InputMethodObserver& observer : observer_list_)
143 observer.OnTextInputStateChanged(client); 145 observer.OnTextInputStateChanged(client);
144 } 146 }
145 147
146 void InputMethodBase::NotifyTextInputCaretBoundsChanged( 148 void InputMethodBase::NotifyTextInputCaretBoundsChanged(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 InputMethod* InputMethodBase::GetInputMethod() { 233 InputMethod* InputMethodBase::GetInputMethod() {
232 return this; 234 return this;
233 } 235 }
234 236
235 const std::vector<std::unique_ptr<ui::KeyEvent>>& 237 const std::vector<std::unique_ptr<ui::KeyEvent>>&
236 InputMethodBase::GetKeyEventsForTesting() { 238 InputMethodBase::GetKeyEventsForTesting() {
237 return key_events_for_testing_; 239 return key_events_for_testing_;
238 } 240 }
239 241
240 } // namespace ui 242 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698