user_chooser_detailed_view_controller.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_SYSTEM_UNIFIED_USER_CHOOSER_DETAILED_VIEW_CONTROLLER_H_
  5. #define ASH_SYSTEM_UNIFIED_USER_CHOOSER_DETAILED_VIEW_CONTROLLER_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/unified/detailed_view_controller.h"
  8. namespace ash {
  9. class UnifiedSystemTrayController;
  10. // Controller of the user chooser detailed view (used for multi-user sign-in) in
  11. // UnifiedSystemTray.
  12. class ASH_EXPORT UserChooserDetailedViewController
  13. : public DetailedViewController {
  14. public:
  15. explicit UserChooserDetailedViewController(
  16. UnifiedSystemTrayController* tray_controller);
  17. UserChooserDetailedViewController(const UserChooserDetailedViewController&) =
  18. delete;
  19. UserChooserDetailedViewController& operator=(
  20. const UserChooserDetailedViewController&) = delete;
  21. ~UserChooserDetailedViewController() override;
  22. // Return true if user chooser is enabled. Called from the view.
  23. static bool IsUserChooserEnabled();
  24. // Transitions back from the detailed view to the main view.
  25. void TransitionToMainView();
  26. // Switch the active user to |user_index|. Called from the view.
  27. void HandleUserSwitch(int user_index);
  28. // Show multi profile login UI. Called from the view.
  29. void HandleAddUserAction();
  30. // DetailedViewController:
  31. views::View* CreateView() override;
  32. std::u16string GetAccessibleName() const override;
  33. private:
  34. UnifiedSystemTrayController* tray_controller_;
  35. };
  36. } // namespace ash
  37. #endif // ASH_SYSTEM_UNIFIED_USER_CHOOSER_DETAILED_VIEW_CONTROLLER_H_