Index: ash/public/interfaces/session_controller_traits.h |
diff --git a/ash/public/interfaces/session_controller_traits.h b/ash/public/interfaces/session_controller_traits.h |
index 059420da820bfb7e5c8cfae7140280b1ea832af6..91034d1d61df506b8913ba2d684f0f31ba7eab23 100644 |
--- a/ash/public/interfaces/session_controller_traits.h |
+++ b/ash/public/interfaces/session_controller_traits.h |
@@ -165,6 +165,33 @@ struct EnumTraits<ash::mojom::AddUserSessionPolicy, ash::AddUserSessionPolicy> { |
} |
}; |
+template <> |
+struct EnumTraits<ash::mojom::CycleUser, ash::CycleUser> { |
+ static ash::mojom::CycleUser ToMojom(ash::CycleUser input) { |
+ switch (input) { |
+ case ash::CycleUser::CYCLE_TO_NEXT_USER: |
+ return ash::mojom::CycleUser::CYCLE_TO_NEXT_USER; |
+ case ash::CycleUser::CYCLE_TO_PREVIOUS_USER: |
+ return ash::mojom::CycleUser::CYCLE_TO_PREVIOUS_USER; |
+ } |
+ NOTREACHED(); |
+ return ash::mojom::CycleUser::CYCLE_TO_NEXT_USER; |
+ } |
+ |
+ static bool FromMojom(ash::mojom::CycleUser input, ash::CycleUser* out) { |
+ switch (input) { |
+ case ash::mojom::CycleUser::CYCLE_TO_NEXT_USER: |
+ *out = ash::CycleUser::CYCLE_TO_NEXT_USER; |
+ return true; |
+ case ash::mojom::CycleUser::CYCLE_TO_PREVIOUS_USER: |
+ *out = ash::CycleUser::CYCLE_TO_PREVIOUS_USER; |
+ return true; |
+ } |
+ NOTREACHED(); |
+ return false; |
+ } |
+}; |
+ |
} // namespace mojo |
#endif // ASH_PUBLIC_INTERFACES_SESSION_CONTROLLER_TRAITS_H_ |