Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1338)

Unified Diff: mojo/examples/aura_demo/demo_context_factory.h

Issue 120503003: run aura_demo as a mojo app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/examples/aura_demo/aura_demo.cc ('k') | mojo/examples/aura_demo/demo_context_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « mojo/examples/aura_demo/aura_demo.cc ('k') | mojo/examples/aura_demo/demo_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698