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

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

Issue 313483002: Gets aura_demo working with the view_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 master and fix windows Created 6 years, 7 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/context_factory_view_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/aura_demo/context_factory_view_manager.h
diff --git a/mojo/examples/aura_demo/context_factory_view_manager.h b/mojo/examples/aura_demo/context_factory_view_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..c74da163b18844815d756ee7f5333a7bbc526fb1
--- /dev/null
+++ b/mojo/examples/aura_demo/context_factory_view_manager.h
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EXAMPLES_AURA_DEMO_CONTEXT_FACTORY_VIEW_MANAGER_H_
+#define MOJO_EXAMPLES_AURA_DEMO_CONTEXT_FACTORY_VIEW_MANAGER_H_
+
+#include "ui/compositor/compositor.h"
+
+namespace mojo {
+namespace view_manager {
+class IViewManager;
+}
+namespace examples {
+
+class ContextFactoryViewManager : public ui::ContextFactory {
+ public:
+ ContextFactoryViewManager(view_manager::IViewManager* view_manager,
+ uint32_t view_id);
+ virtual ~ContextFactoryViewManager();
+
+ private:
+ // ContextFactory:
+ virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
+ ui::Compositor* compositor,
+ bool software_fallback) OVERRIDE;
+ virtual scoped_refptr<ui::Reflector> CreateReflector(
+ ui::Compositor* mirrored_compositor,
+ ui::Layer* mirroring_layer) OVERRIDE;
+ virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) OVERRIDE;
+ virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider()
+ OVERRIDE;
+ virtual void RemoveCompositor(ui::Compositor* compositor) OVERRIDE;
+ virtual bool DoesCreateTestContexts() OVERRIDE;
+ virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE;
+ virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE;
+
+ view_manager::IViewManager* view_manager_;
+ const uint32_t view_id_;
+ scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(ContextFactoryViewManager);
+};
+
+} // namespace examples
+} // namespace mojo
+
+#endif // MOJO_EXAMPLES_AURA_DEMO_CONTEXT_FACTORY_VIEW_MANAGER_H_
« no previous file with comments | « mojo/examples/aura_demo/aura_demo.cc ('k') | mojo/examples/aura_demo/context_factory_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698