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

Unified Diff: views/controls/textfield/native_textfield_views.cc

Issue 8294026: Support IMM32 reconversion on Windows (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/textfield/native_textfield_views.h ('k') | views/ime/input_method_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/native_textfield_views.cc
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc
index d2fbb143179bdf44fa776d04f4d2e91639428127..07725fffba6e7513e1f4288c3917505fb99ddf15 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -791,11 +791,15 @@ bool NativeTextfieldViews::DeleteRange(const ui::Range& range) {
bool NativeTextfieldViews::GetTextFromRange(
const ui::Range& range,
- const base::Callback<void(const string16&)>& callback) {
- if (GetTextInputType() != ui::TEXT_INPUT_TYPE_TEXT || range.is_empty())
+ string16* text) {
+ if (GetTextInputType() != ui::TEXT_INPUT_TYPE_TEXT || !range.IsValid())
+ return false;
+
+ ui::Range text_range;
+ if (!GetTextRange(&text_range) || !text_range.Contains(range))
return false;
- callback.Run(model_->GetTextFromRange(range));
+ *text = model_->GetTextFromRange(range);
return true;
}
« no previous file with comments | « views/controls/textfield/native_textfield_views.h ('k') | views/ime/input_method_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698