home_launcher_animation_info.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2021 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_APP_LIST_HOME_LAUNCHER_ANIMATION_INFO_H_
  5. #define ASH_APP_LIST_HOME_LAUNCHER_ANIMATION_INFO_H_
  6. namespace ash {
  7. // The reason a home launcher animation was triggered.
  8. enum class HomeLauncherAnimationTrigger {
  9. // Launcher animation is triggered by drag release.
  10. kDragRelease,
  11. // Launcher animation is triggered by pressing the AppList button.
  12. kLauncherButton,
  13. // Launcher animation is triggered by window activation.
  14. kHideForWindow,
  15. // Launcher animation is triggered by entering/exiting overview mode where
  16. // overview UI fades in/out.
  17. kOverviewModeFade
  18. };
  19. // Information used to configure animation metrics reporter when animating the
  20. // home launcher.
  21. struct HomeLauncherAnimationInfo {
  22. HomeLauncherAnimationInfo(HomeLauncherAnimationTrigger trigger, bool showing)
  23. : trigger(trigger), showing(showing) {}
  24. ~HomeLauncherAnimationInfo() = default;
  25. // The animation trigger.
  26. const HomeLauncherAnimationTrigger trigger;
  27. // Whether the home screen will be shown at the end of the animation.
  28. const bool showing;
  29. };
  30. } // namespace ash
  31. #endif // ASH_APP_LIST_HOME_LAUNCHER_ANIMATION_INFO_H_