OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef MOJO_EXAMPLES_AURA_DEMO_CONTEXT_FACTORY_VIEW_MANAGER_H_ | |
6 #define MOJO_EXAMPLES_AURA_DEMO_CONTEXT_FACTORY_VIEW_MANAGER_H_ | |
7 | |
8 #include "ui/compositor/compositor.h" | |
9 | |
10 namespace mojo { | |
11 namespace view_manager { | |
12 class IViewManager; | |
13 } | |
14 namespace examples { | |
15 | |
16 class ContextFactoryViewManager : public ui::ContextFactory { | |
17 public: | |
18 ContextFactoryViewManager(view_manager::IViewManager* view_manager, | |
19 uint32_t view_id); | |
20 virtual ~ContextFactoryViewManager(); | |
21 | |
22 private: | |
23 // ContextFactory: | |
24 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | |
25 ui::Compositor* compositor, | |
26 bool software_fallback) OVERRIDE; | |
27 virtual scoped_refptr<ui::Reflector> CreateReflector( | |
28 ui::Compositor* mirrored_compositor, | |
29 ui::Layer* mirroring_layer) OVERRIDE; | |
30 virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) OVERRIDE; | |
31 virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() | |
32 OVERRIDE; | |
33 virtual void RemoveCompositor(ui::Compositor* compositor) OVERRIDE; | |
34 virtual bool DoesCreateTestContexts() OVERRIDE; | |
35 virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE; | |
36 virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE; | |
37 | |
38 view_manager::IViewManager* view_manager_; | |
39 const uint32_t view_id_; | |
40 scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(ContextFactoryViewManager); | |
43 }; | |
44 | |
45 } // namespace examples | |
46 } // namespace mojo | |
47 | |
48 #endif // MOJO_EXAMPLES_AURA_DEMO_CONTEXT_FACTORY_VIEW_MANAGER_H_ | |
OLD | NEW |