| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 5 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
| 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "cc/surfaces/display.h" |
| 11 #include "cc/test/test_gpu_memory_buffer_manager.h" | 13 #include "cc/test/test_gpu_memory_buffer_manager.h" |
| 12 #include "cc/test/test_image_factory.h" | 14 #include "cc/test/test_image_factory.h" |
| 13 #include "cc/test/test_shared_bitmap_manager.h" | 15 #include "cc/test/test_shared_bitmap_manager.h" |
| 14 #include "cc/test/test_task_graph_runner.h" | 16 #include "cc/test/test_task_graph_runner.h" |
| 15 #include "ui/compositor/compositor.h" | 17 #include "ui/compositor/compositor.h" |
| 16 | 18 |
| 17 namespace base { | 19 namespace base { |
| 18 class Thread; | 20 class Thread; |
| 19 } | 21 } |
| 20 | 22 |
| 21 namespace cc { | 23 namespace cc { |
| 22 class OnscreenDisplayClient; | |
| 23 class SurfaceManager; | 24 class SurfaceManager; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace ui { | 27 namespace ui { |
| 27 class InProcessContextProvider; | 28 class InProcessContextProvider; |
| 28 | 29 |
| 29 class InProcessContextFactory : public ContextFactory { | 30 class InProcessContextFactory : public ContextFactory { |
| 30 public: | 31 public: |
| 31 // surface_manager is owned by the creator of this and must outlive the | 32 // surface_manager is owned by the creator of this and must outlive the |
| 32 // context factory. | 33 // context factory. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 scoped_refptr<InProcessContextProvider> shared_worker_context_provider_; | 69 scoped_refptr<InProcessContextProvider> shared_worker_context_provider_; |
| 69 cc::TestSharedBitmapManager shared_bitmap_manager_; | 70 cc::TestSharedBitmapManager shared_bitmap_manager_; |
| 70 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; | 71 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; |
| 71 cc::TestImageFactory image_factory_; | 72 cc::TestImageFactory image_factory_; |
| 72 cc::TestTaskGraphRunner task_graph_runner_; | 73 cc::TestTaskGraphRunner task_graph_runner_; |
| 73 uint32_t next_surface_id_namespace_; | 74 uint32_t next_surface_id_namespace_; |
| 74 bool use_test_surface_; | 75 bool use_test_surface_; |
| 75 bool context_factory_for_test_; | 76 bool context_factory_for_test_; |
| 76 cc::SurfaceManager* surface_manager_; | 77 cc::SurfaceManager* surface_manager_; |
| 77 | 78 |
| 78 base::hash_map<Compositor*, cc::OnscreenDisplayClient*> per_compositor_data_; | 79 base::hash_map<Compositor*, std::unique_ptr<cc::Display>> |
| 80 per_compositor_data_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); | 82 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace ui | 85 } // namespace ui |
| 84 | 86 |
| 85 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 87 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
| OLD | NEW |