layer_animation_observer_test_api.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2015 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 UI_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_TEST_API_H_
  5. #define UI_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_TEST_API_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "ui/compositor/layer_animation_observer.h"
  8. namespace ui {
  9. namespace test {
  10. // Test API to provide internal access to the LayerAnimationObserver class.
  11. class LayerAnimationObserverTestApi {
  12. public:
  13. explicit LayerAnimationObserverTestApi(LayerAnimationObserver* observer);
  14. LayerAnimationObserverTestApi(const LayerAnimationObserverTestApi&) = delete;
  15. LayerAnimationObserverTestApi& operator=(
  16. const LayerAnimationObserverTestApi&) = delete;
  17. // Wrappers for LayerAnimationObserver.
  18. void AttachedToSequence(LayerAnimationSequence* sequence);
  19. void DetachedFromSequence(LayerAnimationSequence* sequence,
  20. bool send_notification);
  21. private:
  22. // The instance to provide internal access to.
  23. raw_ptr<LayerAnimationObserver> observer_;
  24. };
  25. } // namespace test
  26. } // namespace ui
  27. #endif // UI_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_TEST_API_H_