autotest_ambient_api.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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_PUBLIC_CPP_AUTOTEST_AMBIENT_API_H_
  5. #define ASH_PUBLIC_CPP_AUTOTEST_AMBIENT_API_H_
  6. #include "ash/ash_export.h"
  7. #include "base/callback_forward.h"
  8. #include "base/time/time.h"
  9. namespace ash {
  10. // Exposes limited API for the autotest private APIs to interact with Ambient
  11. // mode.
  12. class ASH_EXPORT AutotestAmbientApi {
  13. public:
  14. AutotestAmbientApi();
  15. AutotestAmbientApi(const AutotestAmbientApi&) = delete;
  16. AutotestAmbientApi& operator=(const AutotestAmbientApi&) = delete;
  17. ~AutotestAmbientApi();
  18. // Wait |timeout| for |num_completions| photo transitions to complete. Calls
  19. // |on_complete| if successful and |on_timeout| if |timeout| elapses before
  20. // enough photo transitions occur.
  21. void WaitForPhotoTransitionAnimationCompleted(int num_completions,
  22. base::TimeDelta timeout,
  23. base::OnceClosure on_complete,
  24. base::OnceClosure on_timeout);
  25. };
  26. } // namespace ash
  27. #endif // ASH_PUBLIC_CPP_AUTOTEST_AMBIENT_API_H_