• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef MOJO_AURA_CONTEXT_FACTORY_MOJO_H_
6 #define MOJO_AURA_CONTEXT_FACTORY_MOJO_H_
7 
8 #include "ui/compositor/compositor.h"
9 
10 namespace mojo {
11 
12 class ContextFactoryMojo : public ui::ContextFactory {
13  public:
14   ContextFactoryMojo();
15   virtual ~ContextFactoryMojo();
16 
17  private:
18   // ContextFactory:
19   virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
20       ui::Compositor* compositor,
21       bool software_fallback) OVERRIDE;
22   virtual scoped_refptr<ui::Reflector> CreateReflector(
23       ui::Compositor* mirrored_compositor,
24       ui::Layer* mirroring_layer) OVERRIDE;
25   virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) OVERRIDE;
26   virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider()
27       OVERRIDE;
28   virtual void RemoveCompositor(ui::Compositor* compositor) OVERRIDE;
29   virtual bool DoesCreateTestContexts() OVERRIDE;
30   virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE;
31   virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE;
32 
33   scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_;
34 
35   DISALLOW_COPY_AND_ASSIGN(ContextFactoryMojo);
36 };
37 
38 }  // namespace mojo
39 
40 #endif  // MOJO_AURA_CONTEXT_FACTORY_MOJO_H_
41