| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MEDIA_CAST_CAST_THREAD_H_ | 5 #ifndef MEDIA_CAST_CAST_THREAD_H_ |
| 6 #define MEDIA_CAST_CAST_THREAD_H_ | 6 #define MEDIA_CAST_CAST_THREAD_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/task_runner.h" | 10 #include "base/task_runner.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // the target thread may already have a Quit message in its queue. | 45 // the target thread may already have a Quit message in its queue. |
| 46 bool PostTask(ThreadId identifier, | 46 bool PostTask(ThreadId identifier, |
| 47 const tracked_objects::Location& from_here, | 47 const tracked_objects::Location& from_here, |
| 48 const base::Closure& task); | 48 const base::Closure& task); |
| 49 | 49 |
| 50 bool PostDelayedTask(ThreadId identifier, | 50 bool PostDelayedTask(ThreadId identifier, |
| 51 const tracked_objects::Location& from_here, | 51 const tracked_objects::Location& from_here, |
| 52 const base::Closure& task, | 52 const base::Closure& task, |
| 53 base::TimeDelta delay); | 53 base::TimeDelta delay); |
| 54 | 54 |
| 55 protected: |
| 56 virtual ~CastThread(); |
| 57 |
| 55 private: | 58 private: |
| 59 friend class base::RefCountedThreadSafe<CastThread>; |
| 60 |
| 56 scoped_refptr<base::TaskRunner> GetMessageTaskRunnerForThread( | 61 scoped_refptr<base::TaskRunner> GetMessageTaskRunnerForThread( |
| 57 ThreadId identifier); | 62 ThreadId identifier); |
| 58 | 63 |
| 59 scoped_refptr<base::TaskRunner> main_thread_proxy_; | 64 scoped_refptr<base::TaskRunner> main_thread_proxy_; |
| 60 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy_; | 65 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy_; |
| 61 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy_; | 66 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy_; |
| 62 scoped_refptr<base::TaskRunner> video_encode_thread_proxy_; | 67 scoped_refptr<base::TaskRunner> video_encode_thread_proxy_; |
| 63 scoped_refptr<base::TaskRunner> video_decode_thread_proxy_; | 68 scoped_refptr<base::TaskRunner> video_decode_thread_proxy_; |
| 64 | 69 |
| 65 DISALLOW_COPY_AND_ASSIGN(CastThread); | 70 DISALLOW_COPY_AND_ASSIGN(CastThread); |
| 66 }; | 71 }; |
| 67 | 72 |
| 68 } // namespace cast | 73 } // namespace cast |
| 69 } // namespace media | 74 } // namespace media |
| 70 | 75 |
| 71 #endif // MEDIA_CAST_CAST_THREAD_H_ | 76 #endif // MEDIA_CAST_CAST_THREAD_H_ |
| OLD | NEW |