test_compositor_host_ozone.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_OZONE_H_
  5. #define UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_OZONE_H_
  6. #include "ui/compositor/test/test_compositor_host.h"
  7. #include <memory>
  8. #include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
  9. #include "ui/compositor/compositor.h"
  10. #include "ui/gfx/geometry/rect.h"
  11. namespace ui {
  12. class PlatformWindow;
  13. class TestCompositorHostOzone : public TestCompositorHost {
  14. public:
  15. TestCompositorHostOzone(const gfx::Rect& bounds,
  16. ui::ContextFactory* context_factory);
  17. TestCompositorHostOzone(const TestCompositorHostOzone&) = delete;
  18. TestCompositorHostOzone& operator=(const TestCompositorHostOzone&) = delete;
  19. ~TestCompositorHostOzone() override;
  20. private:
  21. class StubPlatformWindowDelegate;
  22. // Overridden from TestCompositorHost:
  23. void Show() override;
  24. ui::Compositor* GetCompositor() override;
  25. gfx::Rect bounds_;
  26. ui::Compositor compositor_;
  27. std::unique_ptr<PlatformWindow> window_;
  28. std::unique_ptr<StubPlatformWindowDelegate> window_delegate_;
  29. viz::ParentLocalSurfaceIdAllocator allocator_;
  30. };
  31. } // namespace ui
  32. #endif // UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_OZONE_H_