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

Unified Diff: mojo/services/public/cpp/input_events/input_events_type_converters.h

Issue 507173003: Change TypeConverter<X,Y>::ConvertFrom and ConvertTo into a single symmetric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/cpp/input_events/input_events_type_converters.h
diff --git a/mojo/services/public/cpp/input_events/input_events_type_converters.h b/mojo/services/public/cpp/input_events/input_events_type_converters.h
index 64c164560499811682a506e263a0cfd123bf5da6..bbbbe10981c3b848540d3a3fbe2ac0e257b14c4e 100644
--- a/mojo/services/public/cpp/input_events/input_events_type_converters.h
+++ b/mojo/services/public/cpp/input_events/input_events_type_converters.h
@@ -12,30 +12,29 @@
namespace mojo {
-template<>
-class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventType, ui::EventType> {
- public:
- static EventType ConvertFrom(ui::EventType type);
- static ui::EventType ConvertTo(EventType type);
+template <>
+struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventType, ui::EventType> {
+ static EventType Convert(ui::EventType type);
};
-template<>
-class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::Event> {
- public:
- static EventPtr ConvertFrom(const ui::Event& input);
+template <>
+struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<ui::EventType, EventType> {
+ static ui::EventType Convert(EventType type);
};
-template<>
-class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::KeyEvent> {
- public:
- static EventPtr ConvertFrom(const ui::KeyEvent& input);
+template <>
+struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::Event> {
+ static EventPtr Convert(const ui::Event& input);
};
-template<>
-class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr,
- scoped_ptr<ui::Event> > {
- public:
- static scoped_ptr<ui::Event> ConvertTo(const EventPtr& input);
+template <>
+struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::KeyEvent> {
+ static EventPtr Convert(const ui::KeyEvent& input);
+};
+
+template <>
+struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<scoped_ptr<ui::Event>, EventPtr> {
+ static scoped_ptr<ui::Event> Convert(const EventPtr& input);
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698