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_ENVIRONMENT_H_ | 5 #ifndef MEDIA_CAST_CAST_ENVIRONMENT_H_ |
6 #define MEDIA_CAST_CAST_ENVIRONMENT_H_ | 6 #define MEDIA_CAST_CAST_ENVIRONMENT_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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 const base::Closure& task, | 58 const base::Closure& task, |
59 base::TimeDelta delay); | 59 base::TimeDelta delay); |
60 | 60 |
61 bool CurrentlyOn(ThreadId identifier); | 61 bool CurrentlyOn(ThreadId identifier); |
62 | 62 |
63 base::TickClock* Clock() const; | 63 base::TickClock* Clock() const; |
64 | 64 |
65 // Logging is not thread safe. Should always be called from the main thread. | 65 // Logging is not thread safe. Should always be called from the main thread. |
66 LoggingImpl* Logging(); | 66 LoggingImpl* Logging(); |
67 | 67 |
| 68 scoped_refptr<base::TaskRunner> GetMessageTaskRunnerForThread( |
| 69 ThreadId identifier); |
| 70 |
68 protected: | 71 protected: |
69 virtual ~CastEnvironment(); | 72 virtual ~CastEnvironment(); |
70 | 73 |
71 private: | 74 private: |
72 friend class base::RefCountedThreadSafe<CastEnvironment>; | 75 friend class base::RefCountedThreadSafe<CastEnvironment>; |
73 | 76 |
74 scoped_refptr<base::TaskRunner> GetMessageTaskRunnerForThread( | |
75 ThreadId identifier); | |
76 | |
77 base::TickClock* const clock_; // Not owned by this class. | 77 base::TickClock* const clock_; // Not owned by this class. |
78 scoped_refptr<base::TaskRunner> main_thread_proxy_; | 78 scoped_refptr<base::TaskRunner> main_thread_proxy_; |
79 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy_; | 79 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy_; |
80 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy_; | 80 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy_; |
81 scoped_refptr<base::TaskRunner> video_encode_thread_proxy_; | 81 scoped_refptr<base::TaskRunner> video_encode_thread_proxy_; |
82 scoped_refptr<base::TaskRunner> video_decode_thread_proxy_; | 82 scoped_refptr<base::TaskRunner> video_decode_thread_proxy_; |
83 | 83 |
84 scoped_ptr<LoggingImpl> logging_; | 84 scoped_ptr<LoggingImpl> logging_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(CastEnvironment); | 86 DISALLOW_COPY_AND_ASSIGN(CastEnvironment); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace cast | 89 } // namespace cast |
90 } // namespace media | 90 } // namespace media |
91 | 91 |
92 #endif // MEDIA_CAST_CAST_ENVIRONMENT_H_ | 92 #endif // MEDIA_CAST_CAST_ENVIRONMENT_H_ |
OLD | NEW |