test_compositor_host.h 850 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2012 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_H_
  5. #define UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_
  6. namespace gfx {
  7. class Rect;
  8. }
  9. namespace ui {
  10. class Compositor;
  11. class ContextFactory;
  12. class TestCompositorHost {
  13. public:
  14. virtual ~TestCompositorHost() {}
  15. // Creates a new TestCompositorHost. The caller owns the returned value.
  16. static TestCompositorHost* Create(const gfx::Rect& bounds,
  17. ui::ContextFactory* context_factory);
  18. // Shows the TestCompositorHost. Must only be called once.
  19. virtual void Show() = 0;
  20. virtual Compositor* GetCompositor() = 0;
  21. };
  22. } // namespace ui
  23. #endif // UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_