| 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> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "content/child/child_thread_impl.h" | 22 #include "content/child/child_thread_impl.h" |
| 23 #include "content/common/associated_interface_registry_impl.h" | 23 #include "content/common/associated_interface_registry_impl.h" |
| 24 #include "gpu/command_buffer/service/gpu_preferences.h" | 24 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 25 #include "gpu/config/gpu_feature_info.h" | 25 #include "gpu/config/gpu_feature_info.h" |
| 26 #include "gpu/config/gpu_info.h" | 26 #include "gpu/config/gpu_info.h" |
| 27 #include "gpu/ipc/service/gpu_channel.h" | 27 #include "gpu/ipc/service/gpu_channel.h" |
| 28 #include "gpu/ipc/service/gpu_channel_manager.h" | 28 #include "gpu/ipc/service/gpu_channel_manager.h" |
| 29 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" | 29 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" |
| 30 #include "gpu/ipc/service/gpu_config.h" | 30 #include "gpu/ipc/service/gpu_config.h" |
| 31 #include "gpu/ipc/service/x_util.h" | 31 #include "gpu/ipc/service/x_util.h" |
| 32 #include "media/base/android_overlay_mojo_factory.h" |
| 32 #include "mojo/public/cpp/bindings/associated_binding_set.h" | 33 #include "mojo/public/cpp/bindings/associated_binding_set.h" |
| 33 #include "mojo/public/cpp/bindings/binding_set.h" | 34 #include "mojo/public/cpp/bindings/binding_set.h" |
| 34 #include "services/service_manager/public/interfaces/service_factory.mojom.h" | 35 #include "services/service_manager/public/interfaces/service_factory.mojom.h" |
| 35 #include "services/ui/gpu/gpu_service.h" | 36 #include "services/ui/gpu/gpu_service.h" |
| 36 #include "services/ui/gpu/interfaces/gpu_main.mojom.h" | 37 #include "services/ui/gpu/interfaces/gpu_main.mojom.h" |
| 37 #include "ui/gfx/native_widget_types.h" | 38 #include "ui/gfx/native_widget_types.h" |
| 38 | 39 |
| 39 namespace gpu { | 40 namespace gpu { |
| 40 class GpuWatchdogThread; | 41 class GpuWatchdogThread; |
| 41 } | 42 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const std::string& group_name) override; | 109 const std::string& group_name) override; |
| 109 | 110 |
| 110 void BindServiceFactoryRequest( | 111 void BindServiceFactoryRequest( |
| 111 const service_manager::BindSourceInfo& source_info, | 112 const service_manager::BindSourceInfo& source_info, |
| 112 service_manager::mojom::ServiceFactoryRequest request); | 113 service_manager::mojom::ServiceFactoryRequest request); |
| 113 | 114 |
| 114 gpu::GpuChannelManager* gpu_channel_manager() { | 115 gpu::GpuChannelManager* gpu_channel_manager() { |
| 115 return gpu_service_->gpu_channel_manager(); | 116 return gpu_service_->gpu_channel_manager(); |
| 116 } | 117 } |
| 117 | 118 |
| 119 #if defined(OS_ANDROID) |
| 120 static std::unique_ptr<media::AndroidOverlay> CreateAndroidOverlay( |
| 121 const base::UnguessableToken& routing_token, |
| 122 media::AndroidOverlayConfig); |
| 123 #endif |
| 124 |
| 118 // Set this flag to true if a fatal error occurred before we receive the | 125 // Set this flag to true if a fatal error occurred before we receive the |
| 119 // OnInitialize message, in which case we just declare ourselves DOA. | 126 // OnInitialize message, in which case we just declare ourselves DOA. |
| 120 const bool dead_on_arrival_; | 127 const bool dead_on_arrival_; |
| 121 | 128 |
| 122 // Error messages collected in gpu_main() before the thread is created. | 129 // Error messages collected in gpu_main() before the thread is created. |
| 123 DeferredMessages deferred_messages_; | 130 DeferredMessages deferred_messages_; |
| 124 | 131 |
| 125 // Whether the GPU thread is running in the browser process. | 132 // Whether the GPU thread is running in the browser process. |
| 126 const bool in_browser_process_; | 133 const bool in_browser_process_; |
| 127 | 134 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 140 base::Closure release_pending_requests_closure_; | 147 base::Closure release_pending_requests_closure_; |
| 141 | 148 |
| 142 base::WeakPtrFactory<GpuChildThread> weak_factory_; | 149 base::WeakPtrFactory<GpuChildThread> weak_factory_; |
| 143 | 150 |
| 144 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 151 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 145 }; | 152 }; |
| 146 | 153 |
| 147 } // namespace content | 154 } // namespace content |
| 148 | 155 |
| 149 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 156 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |