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