OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef MOJO_AURA_CONTEXT_FACTORY_MOJO_H_ | |
6 #define MOJO_AURA_CONTEXT_FACTORY_MOJO_H_ | |
7 | |
8 #include "mojo/public/cpp/system/core.h" | |
9 #include "ui/compositor/compositor.h" | |
10 | |
11 namespace webkit { | |
12 namespace gpu { | |
13 class ContextProviderInProcess; | |
14 } | |
15 } | |
16 | |
17 namespace mojo { | |
18 | |
19 // The default factory that creates in-process contexts. | |
20 class ContextFactoryMojo : public ui::ContextFactory { | |
21 public: | |
22 explicit ContextFactoryMojo(ScopedMessagePipeHandle command_buffer_handle); | |
23 virtual ~ContextFactoryMojo(); | |
24 | |
25 // ContextFactory implementation | |
26 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | |
27 ui::Compositor* compositor, bool software_fallback) OVERRIDE; | |
28 | |
29 virtual scoped_refptr<ui::Reflector> CreateReflector( | |
30 ui::Compositor* compositor, | |
31 ui::Layer* layer) OVERRIDE; | |
32 virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) OVERRIDE; | |
33 | |
34 virtual scoped_refptr<cc::ContextProvider> | |
35 SharedMainThreadContextProvider() OVERRIDE; | |
36 virtual void RemoveCompositor(ui::Compositor* compositor) OVERRIDE; | |
37 virtual bool DoesCreateTestContexts() OVERRIDE; | |
38 virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE; | |
39 virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE; | |
40 | |
41 private: | |
42 scoped_refptr<webkit::gpu::ContextProviderInProcess> | |
43 shared_main_thread_contexts_; | |
44 | |
45 ScopedMessagePipeHandle command_buffer_handle_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(ContextFactoryMojo); | |
48 }; | |
49 | |
50 } // namespace mojo | |
51 | |
52 #endif // MOJO_AURA_CONTEXT_FACTORY_MOJO_H_ | |
OLD | NEW |