| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_GPU_GPU_CHILD_THREAD_H_ | 5 #ifndef CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ | 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <queue> | 11 #include <queue> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/memory/weak_ptr.h" |
| 18 #include "base/metrics/field_trial.h" | 19 #include "base/metrics/field_trial.h" |
| 19 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 20 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 21 #include "content/child/child_thread_impl.h" | 22 #include "content/child/child_thread_impl.h" |
| 22 #include "content/common/associated_interface_registry_impl.h" | 23 #include "content/common/associated_interface_registry_impl.h" |
| 23 #include "gpu/command_buffer/service/gpu_preferences.h" | 24 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 24 #include "gpu/config/gpu_feature_info.h" | 25 #include "gpu/config/gpu_feature_info.h" |
| 25 #include "gpu/config/gpu_info.h" | 26 #include "gpu/config/gpu_info.h" |
| 26 #include "gpu/ipc/service/gpu_channel.h" | 27 #include "gpu/ipc/service/gpu_channel.h" |
| 27 #include "gpu/ipc/service/gpu_channel_manager.h" | 28 #include "gpu/ipc/service/gpu_channel_manager.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 66 |
| 66 GpuChildThread(const InProcessChildThreadParams& params, | 67 GpuChildThread(const InProcessChildThreadParams& params, |
| 67 const gpu::GPUInfo& gpu_info, | 68 const gpu::GPUInfo& gpu_info, |
| 68 const gpu::GpuFeatureInfo& gpu_feature_info); | 69 const gpu::GpuFeatureInfo& gpu_feature_info); |
| 69 | 70 |
| 70 ~GpuChildThread() override; | 71 ~GpuChildThread() override; |
| 71 | 72 |
| 72 void Init(const base::Time& process_start_time); | 73 void Init(const base::Time& process_start_time); |
| 73 | 74 |
| 74 private: | 75 private: |
| 76 class QueueingConnectionFilter; |
| 77 |
| 75 GpuChildThread(const ChildThreadImpl::Options& options, | 78 GpuChildThread(const ChildThreadImpl::Options& options, |
| 76 std::unique_ptr<gpu::GpuWatchdogThread> gpu_watchdog_thread, | 79 std::unique_ptr<gpu::GpuWatchdogThread> gpu_watchdog_thread, |
| 77 bool dead_on_arrival, | 80 bool dead_on_arrival, |
| 78 bool in_browser_process, | 81 bool in_browser_process, |
| 79 const gpu::GPUInfo& gpu_info, | 82 const gpu::GPUInfo& gpu_info, |
| 80 const gpu::GpuFeatureInfo& gpu_feature_info); | 83 const gpu::GpuFeatureInfo& gpu_feature_info); |
| 81 | 84 |
| 82 void CreateGpuMainService(ui::mojom::GpuMainAssociatedRequest request); | 85 void CreateGpuMainService(ui::mojom::GpuMainAssociatedRequest request); |
| 83 | 86 |
| 84 // ChildThreadImpl:. | 87 // ChildThreadImpl:. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 std::unique_ptr<GpuServiceFactory> service_factory_; | 126 std::unique_ptr<GpuServiceFactory> service_factory_; |
| 124 | 127 |
| 125 // Bindings to the service_manager::mojom::ServiceFactory impl. | 128 // Bindings to the service_manager::mojom::ServiceFactory impl. |
| 126 mojo::BindingSet<service_manager::mojom::ServiceFactory> | 129 mojo::BindingSet<service_manager::mojom::ServiceFactory> |
| 127 service_factory_bindings_; | 130 service_factory_bindings_; |
| 128 | 131 |
| 129 AssociatedInterfaceRegistryImpl associated_interfaces_; | 132 AssociatedInterfaceRegistryImpl associated_interfaces_; |
| 130 std::unique_ptr<ui::GpuService> gpu_service_; | 133 std::unique_ptr<ui::GpuService> gpu_service_; |
| 131 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; | 134 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; |
| 132 | 135 |
| 136 base::WeakPtr<QueueingConnectionFilter> queueing_filter_; |
| 137 |
| 133 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 138 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 134 }; | 139 }; |
| 135 | 140 |
| 136 } // namespace content | 141 } // namespace content |
| 137 | 142 |
| 138 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 143 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |