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 "content/renderer/media/renderer_gpu_video_accelerator_factories.h" | 22 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" |
23 #include "ipc/ipc_channel_proxy.h" | 23 #include "ipc/ipc_channel_proxy.h" |
24 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
25 | 25 |
26 class GrContext; | 26 class GrContext; |
27 class SkBitmap; | 27 class SkBitmap; |
28 struct ViewMsg_New_Params; | 28 struct ViewMsg_New_Params; |
29 | 29 |
30 namespace WebKit { | 30 namespace WebKit { |
31 class WebGamepads; | 31 class WebGamepads; |
32 class WebGraphicsContext3D; | 32 class WebGraphicsContext3D; |
(...skipping 15 matching lines...) Expand all Loading... |
48 namespace cc { | 48 namespace cc { |
49 class ContextProvider; | 49 class ContextProvider; |
50 } | 50 } |
51 | 51 |
52 namespace IPC { | 52 namespace IPC { |
53 class ForwardingMessageFilter; | 53 class ForwardingMessageFilter; |
54 } | 54 } |
55 | 55 |
56 namespace media { | 56 namespace media { |
57 class AudioHardwareConfig; | 57 class AudioHardwareConfig; |
| 58 class GpuVideoDecoderFactories; |
58 } | 59 } |
59 | 60 |
60 namespace v8 { | 61 namespace v8 { |
61 class Extension; | 62 class Extension; |
62 } | 63 } |
63 | 64 |
64 namespace webkit { | 65 namespace webkit { |
65 namespace gpu { | 66 namespace gpu { |
66 class GrContextForWebGraphicsContext3D; | 67 class GrContextForWebGraphicsContext3D; |
67 } | 68 } |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // Returns a MessageLoopProxy instance corresponding to the message loop | 251 // Returns a MessageLoopProxy instance corresponding to the message loop |
251 // of the thread on which media operations should be run. Must be called | 252 // of the thread on which media operations should be run. Must be called |
252 // on the renderer's main thread. | 253 // on the renderer's main thread. |
253 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); | 254 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); |
254 | 255 |
255 // Causes the idle handler to skip sending idle notifications | 256 // Causes the idle handler to skip sending idle notifications |
256 // on the two next scheduled calls, so idle notifications are | 257 // on the two next scheduled calls, so idle notifications are |
257 // not sent for at least one notification delay. | 258 // not sent for at least one notification delay. |
258 void PostponeIdleNotification(); | 259 void PostponeIdleNotification(); |
259 | 260 |
260 // Gets gpu factories, which will run on |factories_loop|. | 261 // Gets gpu factories, which will run on |factories_loop|. Returns NULL if VDA |
261 scoped_refptr<RendererGpuVideoAcceleratorFactories> GetGpuFactories( | 262 // is disabled or a graphics context cannot be obtained. |
| 263 scoped_refptr<RendererGpuVideoDecoderFactories> GetGpuFactories( |
262 const scoped_refptr<base::MessageLoopProxy>& factories_loop); | 264 const scoped_refptr<base::MessageLoopProxy>& factories_loop); |
263 | 265 |
264 // Returns a graphics context shared among all | 266 // Returns a graphics context shared among all |
265 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned | 267 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned |
266 // by this class and must be null-tested before each use to detect context | 268 // by this class and must be null-tested before each use to detect context |
267 // loss. The returned context is only valid on the compositor thread when | 269 // loss. The returned context is only valid on the compositor thread when |
268 // threaded compositing is enabled. | 270 // threaded compositing is enabled. |
269 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); | 271 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); |
270 | 272 |
271 // Handle loss of the shared GpuVDAContext3D context above. | 273 // Handle loss of the shared GpuVDAContext3D context above. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; | 492 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; |
491 | 493 |
492 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 494 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
493 | 495 |
494 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 496 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
495 }; | 497 }; |
496 | 498 |
497 } // namespace content | 499 } // namespace content |
498 | 500 |
499 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 501 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |