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

Unified Diff: ash/public/interfaces/session_controller_traits.h

Issue 2724163002: ash: Use enum for SessionController::CycleActiveUser (Closed)
Patch Set: fix ash_shell_with_content compile Created 3 years, 10 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 | « ash/public/interfaces/session_controller.typemap ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b582ff4a3416b7eeceb28e2b962dafc2b368d687 100644
--- a/ash/public/interfaces/session_controller_traits.h
+++ b/ash/public/interfaces/session_controller_traits.h
@@ -165,6 +165,34 @@ struct EnumTraits<ash::mojom::AddUserSessionPolicy, ash::AddUserSessionPolicy> {
}
};
+template <>
+struct EnumTraits<ash::mojom::CycleUserDirection, ash::CycleUserDirection> {
+ static ash::mojom::CycleUserDirection ToMojom(ash::CycleUserDirection input) {
+ switch (input) {
+ case ash::CycleUserDirection::NEXT:
+ return ash::mojom::CycleUserDirection::NEXT;
+ case ash::CycleUserDirection::PREVIOUS:
+ return ash::mojom::CycleUserDirection::PREVIOUS;
+ }
+ NOTREACHED();
+ return ash::mojom::CycleUserDirection::NEXT;
+ }
+
+ static bool FromMojom(ash::mojom::CycleUserDirection input,
+ ash::CycleUserDirection* out) {
+ switch (input) {
+ case ash::mojom::CycleUserDirection::NEXT:
+ *out = ash::CycleUserDirection::NEXT;
+ return true;
+ case ash::mojom::CycleUserDirection::PREVIOUS:
+ *out = ash::CycleUserDirection::PREVIOUS;
+ return true;
+ }
+ NOTREACHED();
+ return false;
+ }
+};
+
} // namespace mojo
#endif // ASH_PUBLIC_INTERFACES_SESSION_CONTROLLER_TRAITS_H_
« no previous file with comments | « ash/public/interfaces/session_controller.typemap ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698