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

Side by Side Diff: ui/aura/mus/input_method_mus.cc

Issue 2626383002: IME for Mus: EnumTraits for TextInputMode and TextInputType. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « services/ui/public/interfaces/ime/ime_struct_traits_unittest.cc ('k') | no next file » | 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/aura/mus/input_method_mus.h" 5 #include "ui/aura/mus/input_method_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "services/ui/public/interfaces/constants.mojom.h" 10 #include "services/ui/public/interfaces/constants.mojom.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void InputMethodMus::DispatchKeyEvent(ui::KeyEvent* event) { 86 void InputMethodMus::DispatchKeyEvent(ui::KeyEvent* event) {
87 DispatchKeyEvent(event, nullptr); 87 DispatchKeyEvent(event, nullptr);
88 } 88 }
89 89
90 void InputMethodMus::OnTextInputTypeChanged(const ui::TextInputClient* client) { 90 void InputMethodMus::OnTextInputTypeChanged(const ui::TextInputClient* client) {
91 if (IsTextInputClientFocused(client)) 91 if (IsTextInputClientFocused(client))
92 UpdateTextInputType(); 92 UpdateTextInputType();
93 InputMethodBase::OnTextInputTypeChanged(client); 93 InputMethodBase::OnTextInputTypeChanged(client);
94 94
95 if (input_method_) { 95 if (input_method_) {
96 input_method_->OnTextInputTypeChanged( 96 input_method_->OnTextInputTypeChanged(client->GetTextInputType());
97 static_cast<ui::mojom::TextInputType>(client->GetTextInputType()));
98 } 97 }
99 } 98 }
100 99
101 void InputMethodMus::OnCaretBoundsChanged(const ui::TextInputClient* client) { 100 void InputMethodMus::OnCaretBoundsChanged(const ui::TextInputClient* client) {
102 if (input_method_) 101 if (input_method_)
103 input_method_->OnCaretBoundsChanged(client->GetCaretBounds()); 102 input_method_->OnCaretBoundsChanged(client->GetCaretBounds());
104 } 103 }
105 104
106 void InputMethodMus::CancelComposition(const ui::TextInputClient* client) { 105 void InputMethodMus::CancelComposition(const ui::TextInputClient* client) {
107 if (input_method_) 106 if (input_method_)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 event_result = EventResult::HANDLED; 161 event_result = EventResult::HANDLED;
163 } 162 }
164 // |ack_callback| can be null if the standard form of DispatchKeyEvent() is 163 // |ack_callback| can be null if the standard form of DispatchKeyEvent() is
165 // called instead of the version which provides a callback. In mus+ash we 164 // called instead of the version which provides a callback. In mus+ash we
166 // use the version with callback, but some unittests use the standard form. 165 // use the version with callback, but some unittests use the standard form.
167 if (ack_callback) 166 if (ack_callback)
168 ack_callback->Run(event_result); 167 ack_callback->Run(event_result);
169 } 168 }
170 169
171 } // namespace aura 170 } // namespace aura
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/ime/ime_struct_traits_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698