| 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 <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "content/child/child_thread_impl.h" | 17 #include "content/child/child_thread_impl.h" |
| 18 #include "content/common/gpu/gpu_channel.h" | 18 #include "content/common/gpu/gpu_channel.h" |
| 19 #include "content/common/gpu/gpu_channel_manager.h" | 19 #include "content/common/gpu/gpu_channel_manager.h" |
| 20 #include "content/common/gpu/gpu_config.h" | 20 #include "content/common/gpu/gpu_config.h" |
| 21 #include "content/common/gpu/x_util.h" | 21 #include "content/common/gpu/x_util.h" |
| 22 #include "content/common/process_control.mojom.h" |
| 22 #include "gpu/config/gpu_info.h" | 23 #include "gpu/config/gpu_info.h" |
| 23 #include "mojo/common/weak_binding_set.h" | 24 #include "mojo/common/weak_binding_set.h" |
| 24 #include "mojo/public/cpp/bindings/interface_request.h" | 25 #include "mojo/public/cpp/bindings/interface_request.h" |
| 25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
| 26 | 27 |
| 27 namespace gpu { | 28 namespace gpu { |
| 28 class SyncPointManager; | 29 class SyncPointManager; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace sandbox { | 32 namespace sandbox { |
| 32 class TargetServices; | 33 class TargetServices; |
| 33 } | 34 } |
| 34 | 35 |
| 35 namespace content { | 36 namespace content { |
| 36 class GpuMemoryBufferFactory; | 37 class GpuMemoryBufferFactory; |
| 37 class GpuProcessControlImpl; | 38 class GpuProcessControlImpl; |
| 38 class GpuWatchdogThread; | 39 class GpuWatchdogThread; |
| 39 class ProcessControl; | |
| 40 | 40 |
| 41 // The main thread of the GPU child process. There will only ever be one of | 41 // The main thread of the GPU child process. There will only ever be one of |
| 42 // these per process. It does process initialization and shutdown. It forwards | 42 // these per process. It does process initialization and shutdown. It forwards |
| 43 // IPC messages to GpuChannelManager, which is responsible for issuing rendering | 43 // IPC messages to GpuChannelManager, which is responsible for issuing rendering |
| 44 // commands to the GPU. | 44 // commands to the GPU. |
| 45 class GpuChildThread : public ChildThreadImpl { | 45 class GpuChildThread : public ChildThreadImpl { |
| 46 public: | 46 public: |
| 47 typedef std::queue<IPC::Message*> DeferredMessages; | 47 typedef std::queue<IPC::Message*> DeferredMessages; |
| 48 | 48 |
| 49 GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, | 49 GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Bindings to the ProcessControl impl. | 120 // Bindings to the ProcessControl impl. |
| 121 mojo::WeakBindingSet<ProcessControl> process_control_bindings_; | 121 mojo::WeakBindingSet<ProcessControl> process_control_bindings_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 123 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace content | 126 } // namespace content |
| 127 | 127 |
| 128 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 128 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |