Index: mojo/examples/aura_demo/demo_context_factory.h |
diff --git a/ui/compositor/test/default_context_factory.h b/mojo/examples/aura_demo/demo_context_factory.h |
similarity index 51% |
copy from ui/compositor/test/default_context_factory.h |
copy to mojo/examples/aura_demo/demo_context_factory.h |
index 7b8501bf825186df3597c1bca6a8e15b95ad9d9c..f9fdac964deb28b51c5d3ee8883b81d34101d6a3 100644 |
--- a/ui/compositor/test/default_context_factory.h |
+++ b/mojo/examples/aura_demo/demo_context_factory.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ |
-#define UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ |
+#ifndef MOJO_EXAMPLES_AURA_DEMO_DEMO_CONTEXT_FACTORY_H_ |
+#define MOJO_EXAMPLES_AURA_DEMO_DEMO_CONTEXT_FACTORY_H_ |
#include "ui/compositor/compositor.h" |
@@ -13,28 +13,31 @@ class ContextProviderInProcess; |
} |
} |
-namespace ui { |
+namespace mojo { |
+namespace examples { |
+ |
+class RootWindowHostMojo; |
// The default factory that creates in-process contexts. |
-class DefaultContextFactory : public ContextFactory { |
+class DemoContextFactory : public ui::ContextFactory { |
public: |
- DefaultContextFactory(); |
- virtual ~DefaultContextFactory(); |
+ explicit DemoContextFactory(RootWindowHostMojo* rwhm); |
+ virtual ~DemoContextFactory(); |
// ContextFactory implementation |
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
- Compositor* compositor, bool software_fallback) OVERRIDE; |
+ ui::Compositor* compositor, bool software_fallback) OVERRIDE; |
- virtual scoped_refptr<Reflector> CreateReflector( |
- Compositor* compositor, |
- Layer* layer) OVERRIDE; |
- virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE; |
+ virtual scoped_refptr<ui::Reflector> CreateReflector( |
+ ui::Compositor* compositor, |
+ ui::Layer* layer) OVERRIDE; |
+ virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) OVERRIDE; |
virtual scoped_refptr<cc::ContextProvider> |
OffscreenCompositorContextProvider() OVERRIDE; |
virtual scoped_refptr<cc::ContextProvider> |
SharedMainThreadContextProvider() OVERRIDE; |
- virtual void RemoveCompositor(Compositor* compositor) OVERRIDE; |
+ virtual void RemoveCompositor(ui::Compositor* compositor) OVERRIDE; |
virtual bool DoesCreateTestContexts() OVERRIDE; |
bool Initialize(); |
@@ -45,9 +48,12 @@ class DefaultContextFactory : public ContextFactory { |
scoped_refptr<webkit::gpu::ContextProviderInProcess> |
shared_main_thread_contexts_; |
- DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory); |
+ RootWindowHostMojo* rwhm_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DemoContextFactory); |
}; |
-} // namespace ui |
+} // namespace examples |
+} // namespace mojo |
-#endif // UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ |
+#endif // MOJO_EXAMPLES_AURA_DEMO_DEMO_CONTEXT_FACTORY_H_ |