1 // Copyright 2013 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_CONTEXT_FACTORY_H_
6 #define UI_COMPOSITOR_TEST_TEST_CONTEXT_FACTORY_H_
8 #include "ui/compositor/compositor.h"
10 namespace cc { class TestContextProvider; }
14 // The factory that creates test contexts.
15 class TestContextFactory : public ContextFactory {
18 virtual ~TestContextFactory();
20 // ContextFactory implementation
21 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
22 Compositor* compositor) OVERRIDE;
24 virtual scoped_refptr<Reflector> CreateReflector(
25 Compositor* mirrored_compositor,
26 Layer* mirroring_layer) OVERRIDE;
27 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE;
29 virtual scoped_refptr<cc::ContextProvider>
30 OffscreenCompositorContextProvider() OVERRIDE;
31 virtual scoped_refptr<cc::ContextProvider>
32 SharedMainThreadContextProvider() OVERRIDE;
33 virtual void RemoveCompositor(Compositor* compositor) OVERRIDE;
34 virtual bool DoesCreateTestContexts() OVERRIDE;
37 scoped_refptr<cc::TestContextProvider> offscreen_compositor_contexts_;
38 scoped_refptr<cc::TestContextProvider> shared_main_thread_contexts_;
40 DISALLOW_COPY_AND_ASSIGN(TestContextFactory);
45 #endif // UI_COMPOSITOR_TEST_TEST_CONTEXT_FACTORY_H_