1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MOJO_AURA_SURFACE_CONTEXT_FACTORY_H_
6 #define MOJO_AURA_SURFACE_CONTEXT_FACTORY_H_
8 #include "mojo/aura/surface_binding.h"
9 #include "ui/compositor/compositor.h"
15 class SurfaceContextFactory
: public ui::ContextFactory
{
17 SurfaceContextFactory(Shell
* shell
, View
* view
);
18 virtual ~SurfaceContextFactory();
22 virtual scoped_ptr
<cc::OutputSurface
> CreateOutputSurface(
23 ui::Compositor
* compositor
,
24 bool software_fallback
) override
;
25 virtual scoped_refptr
<ui::Reflector
> CreateReflector(
26 ui::Compositor
* mirrored_compositor
,
27 ui::Layer
* mirroring_layer
) override
;
28 virtual void RemoveReflector(scoped_refptr
<ui::Reflector
> reflector
) override
;
29 virtual scoped_refptr
<cc::ContextProvider
> SharedMainThreadContextProvider()
31 virtual void RemoveCompositor(ui::Compositor
* compositor
) override
;
32 virtual bool DoesCreateTestContexts() override
;
33 virtual cc::SharedBitmapManager
* GetSharedBitmapManager() override
;
34 virtual base::MessageLoopProxy
* GetCompositorMessageLoop() override
;
36 SurfaceBinding surface_binding_
;
38 DISALLOW_COPY_AND_ASSIGN(SurfaceContextFactory
);
43 #endif // MOJO_AURA_SURFACE_CONTEXT_FACTORY_H_