wm_metrics.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2022 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_WM_WM_METRICS_H_
  5. #define ASH_WM_WM_METRICS_H_
  6. namespace ash {
  7. // Used to record different ways to snap a window. Note this should be kept in
  8. // sync with WindowSnapActionSource enum in tools/metrics/histograms/enums.xml.
  9. enum class WindowSnapActionSource {
  10. kDragWindowToEdgeToSnap,
  11. kUseCaptionButtonToSnap,
  12. kKeyboardShortcutToSnap,
  13. kDragOrSelectOverviewWindowToSnap,
  14. kLongPressOverviewButtonToSnap,
  15. kDragUpFromShelfToSnap,
  16. kDragDownFromTopToSnap,
  17. kDragTabToSnap,
  18. kAutoSnapBySplitview,
  19. kSnapByWindowStateRestore,
  20. kOthers, // This can include any actions that's not covered above, e.g.,
  21. // window snap by full restore, desk template, desk switch or user
  22. // switch, etc
  23. kMaxValue = kOthers,
  24. };
  25. // Used to save histogram metrics about how the user initiates window snapping.
  26. constexpr char kWindowSnapActionSourceHistogram[] =
  27. "Ash.Wm.WindowSnapActionSource";
  28. } // namespace ash
  29. #endif // ASH_WM_WM_METRICS_H_