Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / compositor / test / in_process_context_factory.h
blob117972937559f4f962d7037934ad659113e6e7d6
1 // Copyright 2014 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_IN_PROCESS_CONTEXT_FACTORY_H_
6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
8 #include "ui/compositor/compositor.h"
10 namespace base {
11 class Thread;
14 namespace webkit {
15 namespace gpu {
16 class ContextProviderInProcess;
20 namespace ui {
22 class InProcessContextFactory : public ContextFactory {
23 public:
24 InProcessContextFactory();
25 virtual ~InProcessContextFactory();
27 // ContextFactory implementation
28 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
29 Compositor* compositor,
30 bool software_fallback) OVERRIDE;
32 virtual scoped_refptr<Reflector> CreateReflector(
33 Compositor* mirrored_compositor,
34 Layer* mirroring_layer) OVERRIDE;
35 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE;
37 virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider()
38 OVERRIDE;
39 virtual void RemoveCompositor(Compositor* compositor) OVERRIDE;
40 virtual bool DoesCreateTestContexts() OVERRIDE;
41 virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE;
42 virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE;
44 private:
45 scoped_ptr<base::Thread> compositor_thread_;
46 scoped_refptr<webkit::gpu::ContextProviderInProcess>
47 shared_main_thread_contexts_;
48 scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_;
50 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory);
53 } // namespace ui
55 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_