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

Unified Diff: services/ui/public/interfaces/ime/ime_struct_traits.h

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 side-by-side diff with in-line comments
Download patch
Index: services/ui/public/interfaces/ime/ime_struct_traits.h
diff --git a/services/ui/public/interfaces/ime/ime_struct_traits.h b/services/ui/public/interfaces/ime/ime_struct_traits.h
index 89079026a7f5a49e8f30beb17ad6c3343e7c0116..70af004debc880b86b05d497c8f7d12c419f920b 100644
--- a/services/ui/public/interfaces/ime/ime_struct_traits.h
+++ b/services/ui/public/interfaces/ime/ime_struct_traits.h
@@ -9,6 +9,8 @@
#include "services/ui/public/interfaces/ime/ime.mojom-shared.h"
#include "ui/base/ime/composition_text.h"
#include "ui/base/ime/composition_underline.h"
+#include "ui/base/ime/text_input_mode.h"
+#include "ui/base/ime/text_input_type.h"
namespace mojo {
@@ -45,6 +47,18 @@ struct StructTraits<ui::mojom::CompositionTextDataView, ui::CompositionText> {
ui::CompositionText* out);
};
+template <>
+struct EnumTraits<ui::mojom::TextInputMode, ui::TextInputMode> {
+ static ui::mojom::TextInputMode ToMojom(ui::TextInputMode text_input_mode);
+ static bool FromMojom(ui::mojom::TextInputMode input, ui::TextInputMode* out);
+};
+
+template <>
+struct EnumTraits<ui::mojom::TextInputType, ui::TextInputType> {
+ static ui::mojom::TextInputType ToMojom(ui::TextInputType text_input_type);
+ static bool FromMojom(ui::mojom::TextInputType input, ui::TextInputType* out);
+};
+
} // namespace mojo
#endif // SERVICES_UI_PUBLIC_INTERFACES_IME_IME_STRUCT_TRAITS_H_
« no previous file with comments | « services/ui/public/interfaces/ime/ime.typemap ('k') | services/ui/public/interfaces/ime/ime_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698