Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: content/gpu/gpu_child_thread.h

Issue 1837143002: media: Pass MediaPermission to MediaDrmBridge Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More plumbing Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/content_renderer.gypi ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 #include "gpu/ipc/service/x_util.h" 27 #include "gpu/ipc/service/x_util.h"
28 #include "mojo/public/cpp/bindings/binding_set.h" 28 #include "mojo/public/cpp/bindings/binding_set.h"
29 #include "mojo/public/cpp/bindings/interface_request.h" 29 #include "mojo/public/cpp/bindings/interface_request.h"
30 #include "ui/gfx/native_widget_types.h" 30 #include "ui/gfx/native_widget_types.h"
31 31
32 namespace gpu { 32 namespace gpu {
33 class GpuMemoryBufferFactory; 33 class GpuMemoryBufferFactory;
34 class SyncPointManager; 34 class SyncPointManager;
35 } 35 }
36 36
37 namespace media {
38 class MediaPermission;
39 }
40
37 namespace sandbox { 41 namespace sandbox {
38 class TargetServices; 42 class TargetServices;
39 } 43 }
40 44
41 namespace content { 45 namespace content {
42 class GpuProcessControlImpl; 46 class GpuProcessControlImpl;
43 class GpuWatchdogThread; 47 class GpuWatchdogThread;
48 class MediaPermissionDispatcher;
44 class MediaService; 49 class MediaService;
45 struct EstablishChannelParams; 50 struct EstablishChannelParams;
46 #if defined(OS_MACOSX) 51 #if defined(OS_MACOSX)
47 struct BufferPresentedParams; 52 struct BufferPresentedParams;
48 #endif 53 #endif
49 54
50 // The main thread of the GPU child process. There will only ever be one of 55 // The main thread of the GPU child process. There will only ever be one of
51 // these per process. It does process initialization and shutdown. It forwards 56 // these per process. It does process initialization and shutdown. It forwards
52 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing 57 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing
53 // rendering commands to the GPU. 58 // rendering commands to the GPU.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 int client_id, 144 int client_id,
140 const gpu::SyncToken& sync_token); 145 const gpu::SyncToken& sync_token);
141 void OnUpdateValueState(int client_id, 146 void OnUpdateValueState(int client_id,
142 unsigned int target, 147 unsigned int target,
143 const gpu::ValueState& state); 148 const gpu::ValueState& state);
144 #if defined(OS_ANDROID) 149 #if defined(OS_ANDROID)
145 void OnWakeUpGpu(); 150 void OnWakeUpGpu();
146 #endif 151 #endif
147 void OnLoseAllContexts(); 152 void OnLoseAllContexts();
148 153
154 // Connect to an interface provided by the service registry.
155 template <typename Interface>
156 void GetInterface(mojo::InterfaceRequest<Interface> request);
157
158 // Returns the MediaPermission associated with this process.
159 media::MediaPermission* GetMediaPermission();
160
149 void BindProcessControlRequest( 161 void BindProcessControlRequest(
150 mojo::InterfaceRequest<mojom::ProcessControl> request); 162 mojo::InterfaceRequest<mojom::ProcessControl> request);
151 163
152 gpu::GpuPreferences gpu_preferences_; 164 gpu::GpuPreferences gpu_preferences_;
153 165
154 // Set this flag to true if a fatal error occurred before we receive the 166 // Set this flag to true if a fatal error occurred before we receive the
155 // OnInitialize message, in which case we just declare ourselves DOA. 167 // OnInitialize message, in which case we just declare ourselves DOA.
156 bool dead_on_arrival_; 168 bool dead_on_arrival_;
157 base::Time process_start_time_; 169 base::Time process_start_time_;
158 scoped_refptr<GpuWatchdogThread> watchdog_thread_; 170 scoped_refptr<GpuWatchdogThread> watchdog_thread_;
(...skipping 15 matching lines...) Expand all
174 186
175 // Error messages collected in gpu_main() before the thread is created. 187 // Error messages collected in gpu_main() before the thread is created.
176 DeferredMessages deferred_messages_; 188 DeferredMessages deferred_messages_;
177 189
178 // Whether the GPU thread is running in the browser process. 190 // Whether the GPU thread is running in the browser process.
179 bool in_browser_process_; 191 bool in_browser_process_;
180 192
181 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. 193 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers.
182 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 194 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
183 195
196 // The media permission dispatcher attached to this frame.
197 scoped_ptr<MediaPermissionDispatcher> media_permission_dispatcher_;
198
184 // Process control for Mojo application hosting. 199 // Process control for Mojo application hosting.
185 std::unique_ptr<GpuProcessControlImpl> process_control_; 200 std::unique_ptr<GpuProcessControlImpl> process_control_;
186 201
187 // Bindings to the mojom::ProcessControl impl. 202 // Bindings to the mojom::ProcessControl impl.
188 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; 203 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_;
189 204
190 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 205 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
191 }; 206 };
192 207
193 } // namespace content 208 } // namespace content
194 209
195 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 210 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698