| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_DEFAULT_CONTEXT_FACTORY_H_ | 5 #ifndef MOJO_EXAMPLES_AURA_DEMO_DEMO_CONTEXT_FACTORY_H_ |
| 6 #define UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ | 6 #define MOJO_EXAMPLES_AURA_DEMO_DEMO_CONTEXT_FACTORY_H_ |
| 7 | 7 |
| 8 #include "ui/compositor/compositor.h" | 8 #include "ui/compositor/compositor.h" |
| 9 | 9 |
| 10 namespace webkit { | 10 namespace webkit { |
| 11 namespace gpu { | 11 namespace gpu { |
| 12 class ContextProviderInProcess; | 12 class ContextProviderInProcess; |
| 13 } | 13 } |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace ui { | 16 namespace mojo { |
| 17 namespace examples { |
| 18 |
| 19 class RootWindowHostMojo; |
| 17 | 20 |
| 18 // The default factory that creates in-process contexts. | 21 // The default factory that creates in-process contexts. |
| 19 class DefaultContextFactory : public ContextFactory { | 22 class DemoContextFactory : public ui::ContextFactory { |
| 20 public: | 23 public: |
| 21 DefaultContextFactory(); | 24 explicit DemoContextFactory(RootWindowHostMojo* rwhm); |
| 22 virtual ~DefaultContextFactory(); | 25 virtual ~DemoContextFactory(); |
| 23 | 26 |
| 24 // ContextFactory implementation | 27 // ContextFactory implementation |
| 25 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 28 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
| 26 Compositor* compositor, bool software_fallback) OVERRIDE; | 29 ui::Compositor* compositor, bool software_fallback) OVERRIDE; |
| 27 | 30 |
| 28 virtual scoped_refptr<Reflector> CreateReflector( | 31 virtual scoped_refptr<ui::Reflector> CreateReflector( |
| 29 Compositor* compositor, | 32 ui::Compositor* compositor, |
| 30 Layer* layer) OVERRIDE; | 33 ui::Layer* layer) OVERRIDE; |
| 31 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE; | 34 virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) OVERRIDE; |
| 32 | 35 |
| 33 virtual scoped_refptr<cc::ContextProvider> | 36 virtual scoped_refptr<cc::ContextProvider> |
| 34 OffscreenCompositorContextProvider() OVERRIDE; | 37 OffscreenCompositorContextProvider() OVERRIDE; |
| 35 virtual scoped_refptr<cc::ContextProvider> | 38 virtual scoped_refptr<cc::ContextProvider> |
| 36 SharedMainThreadContextProvider() OVERRIDE; | 39 SharedMainThreadContextProvider() OVERRIDE; |
| 37 virtual void RemoveCompositor(Compositor* compositor) OVERRIDE; | 40 virtual void RemoveCompositor(ui::Compositor* compositor) OVERRIDE; |
| 38 virtual bool DoesCreateTestContexts() OVERRIDE; | 41 virtual bool DoesCreateTestContexts() OVERRIDE; |
| 39 | 42 |
| 40 bool Initialize(); | 43 bool Initialize(); |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 scoped_refptr<webkit::gpu::ContextProviderInProcess> | 46 scoped_refptr<webkit::gpu::ContextProviderInProcess> |
| 44 offscreen_compositor_contexts_; | 47 offscreen_compositor_contexts_; |
| 45 scoped_refptr<webkit::gpu::ContextProviderInProcess> | 48 scoped_refptr<webkit::gpu::ContextProviderInProcess> |
| 46 shared_main_thread_contexts_; | 49 shared_main_thread_contexts_; |
| 47 | 50 |
| 48 DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory); | 51 RootWindowHostMojo* rwhm_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(DemoContextFactory); |
| 49 }; | 54 }; |
| 50 | 55 |
| 51 } // namespace ui | 56 } // namespace examples |
| 57 } // namespace mojo |
| 52 | 58 |
| 53 #endif // UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ | 59 #endif // MOJO_EXAMPLES_AURA_DEMO_DEMO_CONTEXT_FACTORY_H_ |
| OLD | NEW |