progress_ring_pulse_animation.h 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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_SYSTEM_PROGRESS_INDICATOR_PROGRESS_RING_PULSE_ANIMATION_H_
  5. #define ASH_SYSTEM_PROGRESS_INDICATOR_PROGRESS_RING_PULSE_ANIMATION_H_
  6. #include "ash/system/progress_indicator/progress_ring_animation.h"
  7. namespace ash {
  8. // An animation for a `ProgressIndicator` to paint a pulsing progress ring in
  9. // lieu of the determinate progress ring that would otherwise be painted.
  10. class ProgressRingPulseAnimation : public ProgressRingAnimation {
  11. public:
  12. ProgressRingPulseAnimation();
  13. ProgressRingPulseAnimation(const ProgressRingPulseAnimation&) = delete;
  14. ProgressRingPulseAnimation& operator=(const ProgressRingPulseAnimation&) =
  15. delete;
  16. ~ProgressRingPulseAnimation() override;
  17. private:
  18. // ProgressRingAnimation:
  19. void UpdateAnimatableProperties(double fraction,
  20. float* start_value,
  21. float* end_value,
  22. float* outer_ring_opacity) override;
  23. };
  24. } // namespace ash
  25. #endif // ASH_SYSTEM_PROGRESS_INDICATOR_PROGRESS_RING_PULSE_ANIMATION_H_