| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ | 5 #ifndef UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ |
| 6 #define UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ | 6 #define UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/mus/gles2/mojo_gpu_memory_buffer_manager.h" | 11 #include "components/mus/gles2/mojo_gpu_memory_buffer_manager.h" |
| 12 #include "components/mus/gles2/raster_thread_helper.h" | 12 #include "components/mus/gles2/raster_thread_helper.h" |
| 13 #include "components/mus/public/interfaces/window_tree.mojom.h" | 13 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 14 #include "ui/compositor/compositor.h" | 14 #include "ui/compositor/compositor.h" |
| 15 #include "ui/views/mus/mus_export.h" | 15 #include "ui/views/mus/mus_export.h" |
| 16 #include "ui/views/mus/surface_binding.h" | 16 #include "ui/views/mus/surface_binding.h" |
| 17 | 17 |
| 18 namespace mojo { | 18 namespace mojo { |
| 19 namespace shell { | |
| 20 namespace mojom { | |
| 21 class Shell; | 19 class Shell; |
| 22 } | 20 } |
| 23 } | |
| 24 } | |
| 25 | 21 |
| 26 namespace mus { | 22 namespace mus { |
| 27 class Window; | 23 class Window; |
| 28 } | 24 } |
| 29 | 25 |
| 30 namespace views { | 26 namespace views { |
| 31 | 27 |
| 32 class VIEWS_MUS_EXPORT SurfaceContextFactory : public ui::ContextFactory { | 28 class VIEWS_MUS_EXPORT SurfaceContextFactory : public ui::ContextFactory { |
| 33 public: | 29 public: |
| 34 SurfaceContextFactory(mojo::shell::mojom::Shell* shell, | 30 SurfaceContextFactory(mojo::Shell* shell, |
| 35 mus::Window* window, | 31 mus::Window* window, |
| 36 mus::mojom::SurfaceType surface_type); | 32 mus::mojom::SurfaceType surface_type); |
| 37 ~SurfaceContextFactory() override; | 33 ~SurfaceContextFactory() override; |
| 38 | 34 |
| 39 private: | 35 private: |
| 40 // ContextFactory: | 36 // ContextFactory: |
| 41 void CreateOutputSurface(base::WeakPtr<ui::Compositor> compositor) override; | 37 void CreateOutputSurface(base::WeakPtr<ui::Compositor> compositor) override; |
| 42 scoped_ptr<ui::Reflector> CreateReflector( | 38 scoped_ptr<ui::Reflector> CreateReflector( |
| 43 ui::Compositor* mirrored_compositor, | 39 ui::Compositor* mirrored_compositor, |
| 44 ui::Layer* mirroring_layer) override; | 40 ui::Layer* mirroring_layer) override; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 59 uint32_t next_surface_id_namespace_; | 55 uint32_t next_surface_id_namespace_; |
| 60 gles2::RasterThreadHelper raster_thread_helper_; | 56 gles2::RasterThreadHelper raster_thread_helper_; |
| 61 mus::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; | 57 mus::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; |
| 62 | 58 |
| 63 DISALLOW_COPY_AND_ASSIGN(SurfaceContextFactory); | 59 DISALLOW_COPY_AND_ASSIGN(SurfaceContextFactory); |
| 64 }; | 60 }; |
| 65 | 61 |
| 66 } // namespace views | 62 } // namespace views |
| 67 | 63 |
| 68 #endif // UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ | 64 #endif // UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ |
| OLD | NEW |