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

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

Issue 22401002: Add GetTextInputMode function to TextInputClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build failure on win Created 7 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
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/events/event.h" 7 #include "ui/base/events/event.h"
8 #include "ui/base/ime/input_method.h" 8 #include "ui/base/ime/input_method.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ui::TextInputType InputMethodBridge::GetTextInputType() const { 145 ui::TextInputType InputMethodBridge::GetTextInputType() const {
146 TextInputClient* client = GetTextInputClient(); 146 TextInputClient* client = GetTextInputClient();
147 return client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE; 147 return client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
148 } 148 }
149 149
150 bool InputMethodBridge::CanComposeInline() const { 150 bool InputMethodBridge::CanComposeInline() const {
151 TextInputClient* client = GetTextInputClient(); 151 TextInputClient* client = GetTextInputClient();
152 return client ? client->CanComposeInline() : true; 152 return client ? client->CanComposeInline() : true;
153 } 153 }
154 154
155 ui::TextInputMode InputMethodBridge::GetTextInputMode() const {
156 TextInputClient* client = GetTextInputClient();
157 return client ? client->GetTextInputMode() : ui::TEXT_INPUT_MODE_DEFAULT;
158 }
159
155 gfx::Rect InputMethodBridge::GetCaretBounds() { 160 gfx::Rect InputMethodBridge::GetCaretBounds() {
156 TextInputClient* client = GetTextInputClient(); 161 TextInputClient* client = GetTextInputClient();
157 if (!client) 162 if (!client)
158 return gfx::Rect(); 163 return gfx::Rect();
159 164
160 return client->GetCaretBounds(); 165 return client->GetCaretBounds();
161 } 166 }
162 167
163 bool InputMethodBridge::GetCompositionCharacterBounds(uint32 index, 168 bool InputMethodBridge::GetCompositionCharacterBounds(uint32 index,
164 gfx::Rect* rect) { 169 gfx::Rect* rect) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 OnTextInputTypeChanged(focused); 249 OnTextInputTypeChanged(focused);
245 OnCaretBoundsChanged(focused); 250 OnCaretBoundsChanged(focused);
246 } 251 }
247 252
248 ui::InputMethod* InputMethodBridge::GetHostInputMethod() const { 253 ui::InputMethod* InputMethodBridge::GetHostInputMethod() const {
249 return host_; 254 return host_;
250 } 255 }
251 256
252 257
253 } // namespace views 258 } // namespace views
OLDNEW
« ui/base/ime/text_input_client.h ('K') | « ui/views/ime/input_method_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698