capture_mode_types.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Copyright 2020 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_CAPTURE_MODE_CAPTURE_MODE_TYPES_H_
  5. #define ASH_CAPTURE_MODE_CAPTURE_MODE_TYPES_H_
  6. namespace ash {
  7. // Specifies the camera preview snap position, it can be one of the four corners
  8. // of the surface being recorded. Note that these values are persisted to
  9. // histograms so existing values should remain unchanged and new values should
  10. // be added to the end.
  11. enum class CameraPreviewSnapPosition {
  12. kTopLeft = 0,
  13. kBottomLeft,
  14. kBottomRight,
  15. kTopRight,
  16. kMaxValue = kTopRight,
  17. };
  18. // Defines the capture type Capture Mode is currently using.
  19. enum class CaptureModeType {
  20. kImage,
  21. kVideo,
  22. };
  23. // Defines the source of the capture used by Capture Mode.
  24. enum class CaptureModeSource {
  25. kFullscreen,
  26. kRegion,
  27. kWindow,
  28. };
  29. // Specifies the capture mode allowance types.
  30. enum class CaptureAllowance {
  31. // Capture mode is allowed.
  32. kAllowed,
  33. // Capture mode is blocked due to admin-enforced device policy.
  34. kDisallowedByPolicy,
  35. // Video recording is blocked due to app- or content- enforced content
  36. // protection. Applies only to video recording.
  37. kDisallowedByHdcp
  38. };
  39. // The position of the press event during the fine tune phase of a region
  40. // capture session. This will determine what subsequent drag events do to the
  41. // select region.
  42. enum class FineTunePosition {
  43. // The initial press was outside region. Subsequent drags will do nothing.
  44. kNone,
  45. // The initial press was inside the select region. Subsequent drags will
  46. // move the entire region.
  47. kCenter,
  48. // The initial press was on one of the drag affordance circles. Subsequent
  49. // drags will resize the region. These are sorted clockwise starting at the
  50. // top left.
  51. kTopLeft,
  52. kTopCenter,
  53. kTopRight,
  54. kRightCenter,
  55. kBottomRight,
  56. kBottomCenter,
  57. kBottomLeft,
  58. kLeftCenter,
  59. };
  60. } // namespace ash
  61. #endif // ASH_CAPTURE_MODE_CAPTURE_MODE_TYPES_H_