drag_window_from_shelf_controller_test_api.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2019 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_SHELF_DRAG_WINDOW_FROM_SHELF_CONTROLLER_TEST_API_H_
  5. #define ASH_SHELF_DRAG_WINDOW_FROM_SHELF_CONTROLLER_TEST_API_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/shelf/drag_window_from_shelf_controller.h"
  8. #include "base/run_loop.h"
  9. namespace ash {
  10. class ASH_EXPORT DragWindowFromShelfControllerTestApi
  11. : public DragWindowFromShelfController::Observer {
  12. public:
  13. DragWindowFromShelfControllerTestApi();
  14. ~DragWindowFromShelfControllerTestApi() override;
  15. void WaitUntilOverviewIsShown(
  16. DragWindowFromShelfController* window_drag_controller);
  17. // DragWindowFromShelfController::Observer:
  18. void OnOverviewVisibilityChanged(bool visible) override;
  19. private:
  20. std::unique_ptr<base::RunLoop> show_overview_waiter_;
  21. DragWindowFromShelfControllerTestApi(
  22. const DragWindowFromShelfControllerTestApi&) = delete;
  23. DragWindowFromShelfControllerTestApi& operator=(
  24. const DragWindowFromShelfControllerTestApi&) = delete;
  25. };
  26. } // namespace ash
  27. #endif // ASH_SHELF_DRAG_WINDOW_FROM_SHELF_CONTROLLER_TEST_API_H_