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

Unified Diff: ui/platform_window/mojo/ime_type_converters.cc

Issue 2496773002: Mojo C++ bindings: switch ui/platform_window mojom target to use STL types. (Closed)
Patch Set: Created 4 years, 1 month 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 | « ui/platform_window/mojo/OWNERS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/platform_window/mojo/ime_type_converters.cc
diff --git a/ui/platform_window/mojo/ime_type_converters.cc b/ui/platform_window/mojo/ime_type_converters.cc
index 6ee086d13a7686a2c5d8419abaabde41c20ca20a..2edc9bb92c1baef0f2296d02fa1aa0b11c8c0bc4 100644
--- a/ui/platform_window/mojo/ime_type_converters.cc
+++ b/ui/platform_window/mojo/ime_type_converters.cc
@@ -62,14 +62,11 @@ ui::TextInputType TypeConverter<ui::TextInputType, TextInputType>::Convert(
ui::TextInputState
TypeConverter<ui::TextInputState, TextInputStatePtr>::Convert(
const TextInputStatePtr& input) {
- return ui::TextInputState(ConvertTo<ui::TextInputType>(input->type),
- input->flags,
- input->text.To<std::string>(),
- input->selection_start,
- input->selection_end,
- input->composition_start,
- input->composition_end,
- input->can_compose_inline);
+ return ui::TextInputState(
+ ConvertTo<ui::TextInputType>(input->type), input->flags,
+ input->text.has_value() ? input->text.value() : std::string(),
+ input->selection_start, input->selection_end, input->composition_start,
+ input->composition_end, input->can_compose_inline);
}
} // namespace mojo
« no previous file with comments | « ui/platform_window/mojo/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698