Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / compositor / test / test_compositor_host.h
blob2fc1f16e193cb96cb33026abb96fb332e0fdbee1
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.
5 #ifndef UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_
6 #define UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_
8 namespace gfx {
9 class Rect;
12 namespace ui {
14 class Compositor;
15 class ContextFactory;
17 class TestCompositorHost {
18 public:
19 virtual ~TestCompositorHost() {}
21 // Creates a new TestCompositorHost. The caller owns the returned value.
22 static TestCompositorHost* Create(const gfx::Rect& bounds,
23 ui::ContextFactory* context_factory);
25 // Shows the TestCompositorHost. Must only be called once.
26 virtual void Show() = 0;
28 virtual Compositor* GetCompositor() = 0;
31 } // namespace ui
33 #endif // UI_COMPOSITOR_TEST_TEST_COMPOSITOR_HOST_H_