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 22 matching lines...) Expand all Loading... |
33 #include "mojo/public/cpp/bindings/binding_set.h" | 33 #include "mojo/public/cpp/bindings/binding_set.h" |
34 #include "services/service_manager/public/interfaces/service_factory.mojom.h" | 34 #include "services/service_manager/public/interfaces/service_factory.mojom.h" |
35 #include "services/ui/gpu/gpu_service.h" | 35 #include "services/ui/gpu/gpu_service.h" |
36 #include "services/ui/gpu/interfaces/gpu_main.mojom.h" | 36 #include "services/ui/gpu/interfaces/gpu_main.mojom.h" |
37 #include "ui/gfx/native_widget_types.h" | 37 #include "ui/gfx/native_widget_types.h" |
38 | 38 |
39 namespace gpu { | 39 namespace gpu { |
40 class GpuWatchdogThread; | 40 class GpuWatchdogThread; |
41 } | 41 } |
42 | 42 |
| 43 namespace service_manager { |
| 44 struct BindSourceInfo; |
| 45 } |
| 46 |
43 namespace content { | 47 namespace content { |
44 class GpuServiceFactory; | 48 class GpuServiceFactory; |
45 | 49 |
46 // The main thread of the GPU child process. There will only ever be one of | 50 // The main thread of the GPU child process. There will only ever be one of |
47 // these per process. It does process initialization and shutdown. It forwards | 51 // these per process. It does process initialization and shutdown. It forwards |
48 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing | 52 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing |
49 // rendering commands to the GPU. | 53 // rendering commands to the GPU. |
50 class GpuChildThread : public ChildThreadImpl, | 54 class GpuChildThread : public ChildThreadImpl, |
51 public ui::mojom::GpuMain, | 55 public ui::mojom::GpuMain, |
52 public base::FieldTrialList::Observer { | 56 public base::FieldTrialList::Observer { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 mojo::ScopedSharedBufferHandle activity_flags) override; | 101 mojo::ScopedSharedBufferHandle activity_flags) override; |
98 void CreateFrameSinkManager( | 102 void CreateFrameSinkManager( |
99 cc::mojom::FrameSinkManagerRequest request, | 103 cc::mojom::FrameSinkManagerRequest request, |
100 cc::mojom::FrameSinkManagerClientPtr client) override; | 104 cc::mojom::FrameSinkManagerClientPtr client) override; |
101 | 105 |
102 // base::FieldTrialList::Observer: | 106 // base::FieldTrialList::Observer: |
103 void OnFieldTrialGroupFinalized(const std::string& trial_name, | 107 void OnFieldTrialGroupFinalized(const std::string& trial_name, |
104 const std::string& group_name) override; | 108 const std::string& group_name) override; |
105 | 109 |
106 void BindServiceFactoryRequest( | 110 void BindServiceFactoryRequest( |
| 111 const service_manager::BindSourceInfo& source_info, |
107 service_manager::mojom::ServiceFactoryRequest request); | 112 service_manager::mojom::ServiceFactoryRequest request); |
108 | 113 |
109 gpu::GpuChannelManager* gpu_channel_manager() { | 114 gpu::GpuChannelManager* gpu_channel_manager() { |
110 return gpu_service_->gpu_channel_manager(); | 115 return gpu_service_->gpu_channel_manager(); |
111 } | 116 } |
112 | 117 |
113 // Set this flag to true if a fatal error occurred before we receive the | 118 // Set this flag to true if a fatal error occurred before we receive the |
114 // OnInitialize message, in which case we just declare ourselves DOA. | 119 // OnInitialize message, in which case we just declare ourselves DOA. |
115 const bool dead_on_arrival_; | 120 const bool dead_on_arrival_; |
116 | 121 |
(...skipping 18 matching lines...) Expand all Loading... |
135 base::Closure release_pending_requests_closure_; | 140 base::Closure release_pending_requests_closure_; |
136 | 141 |
137 base::WeakPtrFactory<GpuChildThread> weak_factory_; | 142 base::WeakPtrFactory<GpuChildThread> weak_factory_; |
138 | 143 |
139 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 144 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
140 }; | 145 }; |
141 | 146 |
142 } // namespace content | 147 } // namespace content |
143 | 148 |
144 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 149 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
OLD | NEW |