// 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 CreateOutputSurface( ui::Compositor* compositor, bool software_fallback) OVERRIDE; virtual scoped_refptr CreateReflector( ui::Compositor* mirrored_compositor, ui::Layer* mirroring_layer) OVERRIDE; virtual void RemoveReflector(scoped_refptr reflector) OVERRIDE; virtual scoped_refptr 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 shared_bitmap_manager_; DISALLOW_COPY_AND_ASSIGN(ContextFactoryViewManager); }; } // namespace examples } // namespace mojo #endif // MOJO_EXAMPLES_AURA_DEMO_CONTEXT_FACTORY_VIEW_MANAGER_H_