summaryrefslogtreecommitdiffstats
path: root/chromium/mojo/aura/context_factory_mojo.h
blob: 800afa7bd6d458480f80980816f70d49cca56e56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// 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_AURA_CONTEXT_FACTORY_MOJO_H_
#define MOJO_AURA_CONTEXT_FACTORY_MOJO_H_

#include "ui/compositor/compositor.h"

namespace mojo {

class ContextFactoryMojo : public ui::ContextFactory {
 public:
  ContextFactoryMojo();
  virtual ~ContextFactoryMojo();

 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;

  scoped_ptr<cc::SharedBitmapManager> shared_bitmap_manager_;

  DISALLOW_COPY_AND_ASSIGN(ContextFactoryMojo);
};

}  // namespace mojo

#endif  // MOJO_AURA_CONTEXT_FACTORY_MOJO_H_