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

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: Reorder declaration 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
« no previous file with comments | « ui/views/ime/input_method_bridge.h ('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) 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 TextInputClient* client = GetTextInputClient(); 140 TextInputClient* client = GetTextInputClient();
141 return client ? 141 return client ?
142 client->GetAttachedWindow() : static_cast<gfx::NativeWindow>(NULL); 142 client->GetAttachedWindow() : static_cast<gfx::NativeWindow>(NULL);
143 } 143 }
144 144
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 ui::TextInputMode InputMethodBridge::GetTextInputMode() const {
151 TextInputClient* client = GetTextInputClient();
152 return client ? client->GetTextInputMode() : ui::TEXT_INPUT_MODE_DEFAULT;
153 }
154
150 bool InputMethodBridge::CanComposeInline() const { 155 bool InputMethodBridge::CanComposeInline() const {
151 TextInputClient* client = GetTextInputClient(); 156 TextInputClient* client = GetTextInputClient();
152 return client ? client->CanComposeInline() : true; 157 return client ? client->CanComposeInline() : true;
153 } 158 }
154 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
(...skipping 84 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
« no previous file with comments | « 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