shelf_test_api.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_PUBLIC_CPP_SHELF_TEST_API_H_
  5. #define ASH_PUBLIC_CPP_SHELF_TEST_API_H_
  6. #include "ash/ash_export.h"
  7. namespace views {
  8. class View;
  9. }
  10. namespace ash {
  11. struct ScrollableShelfInfo;
  12. struct ShelfState;
  13. struct HotseatInfo;
  14. // All methods operate on the shelf on the primary display.
  15. class ASH_EXPORT ShelfTestApi {
  16. public:
  17. ShelfTestApi();
  18. virtual ~ShelfTestApi();
  19. // Returns true if the shelf is visible (e.g. not auto-hidden).
  20. bool IsVisible();
  21. // Returns true if the shelf alignment is BOTTOM_LOCKED, which is not exposed
  22. // via prefs.
  23. bool IsAlignmentBottomLocked();
  24. views::View* GetHomeButton();
  25. // Returns ui information of scrollable shelf for the given state. If |state|
  26. // specifies the scroll distance, the target offset, which is the offset value
  27. // after scrolling by the distance, is also calculated. It is useful if you
  28. // want to know the offset before the real scroll starts. Note that this
  29. // function does not change the scrollable shelf.
  30. ScrollableShelfInfo GetScrollableShelfInfoForState(const ShelfState& state);
  31. // Returns ui information of hotseat.
  32. HotseatInfo GetHotseatInfo();
  33. };
  34. } // namespace ash
  35. #endif // ASH_PUBLIC_CPP_SHELF_TEST_API_H_