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

Side by Side Diff: ui/views/ime/input_method_bridge.cc

Issue 10825254: Remove views::KeyEvent, replacing uses of it with ui::KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/ime/input_method_bridge.h ('k') | ui/views/ime/input_method_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/ime/input_method_bridge.h" 5 #include "ui/views/ime/input_method_bridge.h"
6 6
7 #include "ui/base/event.h"
7 #include "ui/base/ime/input_method.h" 8 #include "ui/base/ime/input_method.h"
8 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
9 #include "ui/views/view.h" 10 #include "ui/views/view.h"
10 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
11 12
12 namespace views { 13 namespace views {
13 14
14 InputMethodBridge::InputMethodBridge(internal::InputMethodDelegate* delegate, 15 InputMethodBridge::InputMethodBridge(internal::InputMethodDelegate* delegate,
15 ui::InputMethod* host) 16 ui::InputMethod* host)
16 : host_(host), 17 : host_(host),
(...skipping 26 matching lines...) Expand all
43 44
44 void InputMethodBridge::OnBlur() { 45 void InputMethodBridge::OnBlur() {
45 DCHECK(widget_focused()); 46 DCHECK(widget_focused());
46 47
47 ConfirmCompositionText(); 48 ConfirmCompositionText();
48 InputMethodBase::OnBlur(); 49 InputMethodBase::OnBlur();
49 if (host_->GetTextInputClient() == this) 50 if (host_->GetTextInputClient() == this)
50 host_->SetFocusedTextInputClient(NULL); 51 host_->SetFocusedTextInputClient(NULL);
51 } 52 }
52 53
53 void InputMethodBridge::DispatchKeyEvent(const KeyEvent& key) { 54 void InputMethodBridge::DispatchKeyEvent(const ui::KeyEvent& key) {
54 DCHECK(key.type() == ui::ET_KEY_PRESSED || key.type() == ui::ET_KEY_RELEASED); 55 DCHECK(key.type() == ui::ET_KEY_PRESSED || key.type() == ui::ET_KEY_RELEASED);
55 56
56 // We can just dispatch the event here since the |key| is already processed by 57 // We can just dispatch the event here since the |key| is already processed by
57 // the system-wide IME. 58 // the system-wide IME.
58 DispatchKeyEventPostIME(key); 59 DispatchKeyEventPostIME(key);
59 } 60 }
60 61
61 void InputMethodBridge::OnTextInputTypeChanged(View* view) { 62 void InputMethodBridge::OnTextInputTypeChanged(View* view) {
62 if (IsViewFocused(view)) 63 if (IsViewFocused(view))
63 host_->OnTextInputTypeChanged(this); 64 host_->OnTextInputTypeChanged(this);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 void InputMethodBridge::OnWillChangeFocus(View* focused_before, View* focused) { 217 void InputMethodBridge::OnWillChangeFocus(View* focused_before, View* focused) {
217 ConfirmCompositionText(); 218 ConfirmCompositionText();
218 } 219 }
219 220
220 void InputMethodBridge::OnDidChangeFocus(View* focused_before, View* focused) { 221 void InputMethodBridge::OnDidChangeFocus(View* focused_before, View* focused) {
221 OnTextInputTypeChanged(GetFocusedView()); 222 OnTextInputTypeChanged(GetFocusedView());
222 OnCaretBoundsChanged(GetFocusedView()); 223 OnCaretBoundsChanged(GetFocusedView());
223 } 224 }
224 225
225 } // namespace views 226 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/ime/input_method_bridge.h ('k') | ui/views/ime/input_method_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698