| 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/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "content/child/child_thread.h" | 16 #include "content/child/child_thread.h" |
| 17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "content/common/gpu/client/gpu_channel_host.h" | 18 #include "content/common/gpu/client/gpu_channel_host.h" |
| 19 #include "content/common/gpu/gpu_process_launch_causes.h" | 19 #include "content/common/gpu/gpu_process_launch_causes.h" |
| 20 #include "content/public/renderer/render_thread.h" | 20 #include "content/public/renderer/render_thread.h" |
| 21 #include "ipc/ipc_channel_proxy.h" | 21 #include "ipc/ipc_channel_proxy.h" |
| 22 #include "media/filters/gpu_video_decoder.h" |
| 22 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
| 23 | 24 |
| 24 class GrContext; | 25 class GrContext; |
| 25 class SkBitmap; | 26 class SkBitmap; |
| 26 struct ViewMsg_New_Params; | 27 struct ViewMsg_New_Params; |
| 27 | 28 |
| 28 namespace WebKit { | 29 namespace WebKit { |
| 29 class WebGraphicsContext3D; | 30 class WebGraphicsContext3D; |
| 30 class WebMediaStreamCenter; | 31 class WebMediaStreamCenter; |
| 31 class WebMediaStreamCenterClient; | 32 class WebMediaStreamCenterClient; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Returns a MessageLoopProxy instance corresponding to the message loop | 246 // Returns a MessageLoopProxy instance corresponding to the message loop |
| 246 // of the thread on which media operations should be run. Must be called | 247 // of the thread on which media operations should be run. Must be called |
| 247 // on the renderer's main thread. | 248 // on the renderer's main thread. |
| 248 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); | 249 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); |
| 249 | 250 |
| 250 // Causes the idle handler to skip sending idle notifications | 251 // Causes the idle handler to skip sending idle notifications |
| 251 // on the two next scheduled calls, so idle notifications are | 252 // on the two next scheduled calls, so idle notifications are |
| 252 // not sent for at least one notification delay. | 253 // not sent for at least one notification delay. |
| 253 void PostponeIdleNotification(); | 254 void PostponeIdleNotification(); |
| 254 | 255 |
| 256 // Gets gpu factories. Returns NULL if VDA is disabled or a graphics context |
| 257 // cannot be obtained. |
| 258 scoped_refptr<media::GpuVideoDecoder::Factories> GetGpuFactories(); |
| 259 |
| 255 // Returns a graphics context shared among all | 260 // Returns a graphics context shared among all |
| 256 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned | 261 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned |
| 257 // by this class and must be null-tested before each use to detect context | 262 // by this class and must be null-tested before each use to detect context |
| 258 // loss. The returned context is only valid on the compositor thread when | 263 // loss. The returned context is only valid on the compositor thread when |
| 259 // threaded compositing is enabled. | 264 // threaded compositing is enabled. |
| 260 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); | 265 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); |
| 261 | 266 |
| 262 // Handle loss of the shared GpuVDAContext3D context above. | 267 // Handle loss of the shared GpuVDAContext3D context above. |
| 263 static void OnGpuVDAContextLoss(); | 268 static void OnGpuVDAContextLoss(); |
| 264 | 269 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; | 471 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; |
| 467 | 472 |
| 468 HistogramCustomizer histogram_customizer_; | 473 HistogramCustomizer histogram_customizer_; |
| 469 | 474 |
| 470 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 475 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 471 }; | 476 }; |
| 472 | 477 |
| 473 } // namespace content | 478 } // namespace content |
| 474 | 479 |
| 475 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 480 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |