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_RENDERER_RENDER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/memory_pressure_listener.h" | 12 #include "base/memory/memory_pressure_listener.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "content/child/child_thread.h" | 17 #include "content/child/child_thread.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 #include "content/common/gpu/client/gpu_channel_host.h" | 19 #include "content/common/gpu/client/gpu_channel_host.h" |
20 #include "content/common/gpu/gpu_process_launch_causes.h" | 20 #include "content/common/gpu/gpu_process_launch_causes.h" |
21 #include "content/public/renderer/render_thread.h" | 21 #include "content/public/renderer/render_thread.h" |
22 #include "ipc/ipc_channel_proxy.h" | 22 #include "ipc/ipc_channel_proxy.h" |
23 #include "media/filters/gpu_video_decoder.h" | |
24 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
25 | 24 |
26 class GrContext; | 25 class GrContext; |
27 class SkBitmap; | 26 class SkBitmap; |
28 struct ViewMsg_New_Params; | 27 struct ViewMsg_New_Params; |
29 | 28 |
30 namespace WebKit { | 29 namespace WebKit { |
31 class WebGraphicsContext3D; | 30 class WebGraphicsContext3D; |
32 class WebMediaStreamCenter; | 31 class WebMediaStreamCenter; |
33 class WebMediaStreamCenterClient; | 32 class WebMediaStreamCenterClient; |
(...skipping 13 matching lines...) Expand all Loading... |
47 namespace cc { | 46 namespace cc { |
48 class ContextProvider; | 47 class ContextProvider; |
49 } | 48 } |
50 | 49 |
51 namespace IPC { | 50 namespace IPC { |
52 class ForwardingMessageFilter; | 51 class ForwardingMessageFilter; |
53 } | 52 } |
54 | 53 |
55 namespace media { | 54 namespace media { |
56 class AudioHardwareConfig; | 55 class AudioHardwareConfig; |
| 56 class GpuVideoDecoderFactories; |
57 } | 57 } |
58 | 58 |
59 namespace v8 { | 59 namespace v8 { |
60 class Extension; | 60 class Extension; |
61 } | 61 } |
62 | 62 |
63 namespace webkit { | 63 namespace webkit { |
64 namespace gpu { | 64 namespace gpu { |
65 class GrContextForWebGraphicsContext3D; | 65 class GrContextForWebGraphicsContext3D; |
66 } | 66 } |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // on the renderer's main thread. | 250 // on the renderer's main thread. |
251 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); | 251 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); |
252 | 252 |
253 // Causes the idle handler to skip sending idle notifications | 253 // Causes the idle handler to skip sending idle notifications |
254 // on the two next scheduled calls, so idle notifications are | 254 // on the two next scheduled calls, so idle notifications are |
255 // not sent for at least one notification delay. | 255 // not sent for at least one notification delay. |
256 void PostponeIdleNotification(); | 256 void PostponeIdleNotification(); |
257 | 257 |
258 // Gets gpu factories. Returns NULL if VDA is disabled or a graphics context | 258 // Gets gpu factories. Returns NULL if VDA is disabled or a graphics context |
259 // cannot be obtained. | 259 // cannot be obtained. |
260 scoped_refptr<media::GpuVideoDecoder::Factories> GetGpuFactories(); | 260 scoped_refptr<media::GpuVideoDecoderFactories> GetGpuFactories(); |
261 | 261 |
262 // Returns a graphics context shared among all | 262 // Returns a graphics context shared among all |
263 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned | 263 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned |
264 // by this class and must be null-tested before each use to detect context | 264 // by this class and must be null-tested before each use to detect context |
265 // loss. The returned context is only valid on the compositor thread when | 265 // loss. The returned context is only valid on the compositor thread when |
266 // threaded compositing is enabled. | 266 // threaded compositing is enabled. |
267 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); | 267 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); |
268 | 268 |
269 // Handle loss of the shared GpuVDAContext3D context above. | 269 // Handle loss of the shared GpuVDAContext3D context above. |
270 static void OnGpuVDAContextLoss(); | 270 static void OnGpuVDAContextLoss(); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 485 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
486 | 486 |
487 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; | 487 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; |
488 | 488 |
489 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 489 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
490 }; | 490 }; |
491 | 491 |
492 } // namespace content | 492 } // namespace content |
493 | 493 |
494 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 494 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |