OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 5 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
7 | 7 |
8 #include "ui/compositor/compositor.h" | 8 #include "ui/compositor/compositor.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class Thread; | 11 class Thread; |
12 } | 12 } |
13 | 13 |
14 namespace webkit { | 14 namespace webkit { |
15 namespace gpu { | 15 namespace gpu { |
16 class ContextProviderInProcess; | 16 class ContextProviderInProcess; |
17 } | 17 } |
18 } | 18 } |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 class InProcessContextFactory : public ContextFactory { | 22 class InProcessContextFactory : public ContextFactory { |
23 public: | 23 public: |
24 InProcessContextFactory(); | 24 InProcessContextFactory(); |
25 virtual ~InProcessContextFactory(); | 25 virtual ~InProcessContextFactory(); |
26 | 26 |
27 // ContextFactory implementation | 27 // ContextFactory implementation |
28 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 28 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
29 Compositor* compositor, | 29 Compositor* compositor, |
30 bool software_fallback) OVERRIDE; | 30 bool software_fallback) override; |
31 | 31 |
32 virtual scoped_refptr<Reflector> CreateReflector( | 32 virtual scoped_refptr<Reflector> CreateReflector( |
33 Compositor* mirrored_compositor, | 33 Compositor* mirrored_compositor, |
34 Layer* mirroring_layer) OVERRIDE; | 34 Layer* mirroring_layer) override; |
35 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE; | 35 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) override; |
36 | 36 |
37 virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() | 37 virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() |
38 OVERRIDE; | 38 override; |
39 virtual void RemoveCompositor(Compositor* compositor) OVERRIDE; | 39 virtual void RemoveCompositor(Compositor* compositor) override; |
40 virtual bool DoesCreateTestContexts() OVERRIDE; | 40 virtual bool DoesCreateTestContexts() override; |
41 virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE; | 41 virtual cc::SharedBitmapManager* GetSharedBitmapManager() override; |
42 virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE; | 42 virtual base::MessageLoopProxy* GetCompositorMessageLoop() override; |
43 | 43 |
44 private: | 44 private: |
45 scoped_ptr<base::Thread> compositor_thread_; | 45 scoped_ptr<base::Thread> compositor_thread_; |
46 scoped_refptr<webkit::gpu::ContextProviderInProcess> | 46 scoped_refptr<webkit::gpu::ContextProviderInProcess> |
47 shared_main_thread_contexts_; | 47 shared_main_thread_contexts_; |
48 scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_; | 48 scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); | 50 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace ui | 53 } // namespace ui |
54 | 54 |
55 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 55 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
OLD | NEW |