| Index: media/cast/cast_environment.h
|
| diff --git a/media/cast/cast_environment.h b/media/cast/cast_environment.h
|
| index 5abb5c7376f33dec4393175d9e4f590b1b1ed359..66cd07d56eb5faec33e6a18a4403e200fd802da7 100644
|
| --- a/media/cast/cast_environment.h
|
| +++ b/media/cast/cast_environment.h
|
| @@ -46,7 +46,7 @@ class CastEnvironment : public base::RefCountedThreadSafe<CastEnvironment> {
|
| scoped_refptr<base::SingleThreadTaskRunner> video_encode_thread_proxy,
|
| scoped_refptr<base::SingleThreadTaskRunner> video_decode_thread_proxy,
|
| scoped_refptr<base::SingleThreadTaskRunner> transport_thread_proxy,
|
| - const CastLoggingConfig& config);
|
| + const CastLoggingConfig& logging_config);
|
|
|
| // These are the same methods in message_loop.h, but are guaranteed to either
|
| // get posted to the MessageLoop if it's still alive, or be deleted otherwise.
|
| @@ -64,13 +64,15 @@ class CastEnvironment : public base::RefCountedThreadSafe<CastEnvironment> {
|
|
|
| bool CurrentlyOn(ThreadId identifier);
|
|
|
| - base::TickClock* Clock() const;
|
| + // All of the media::cast implementation must use this TickClock.
|
| + base::TickClock* Clock() const { return clock_.get(); }
|
|
|
| - // Logging is not thread safe. Should always be called from the main thread.
|
| - LoggingImpl* Logging();
|
| + // Logging is not thread safe. Its methods should always be called from the
|
| + // main thread.
|
| + LoggingImpl* Logging() const { return logging_.get(); }
|
|
|
| - scoped_refptr<base::SingleThreadTaskRunner>
|
| - GetMessageSingleThreadTaskRunnerForThread(ThreadId identifier);
|
| + scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner(
|
| + ThreadId identifier) const;
|
|
|
| bool HasAudioEncoderThread() {
|
| return audio_encode_thread_proxy_ ? true : false;
|
| @@ -81,12 +83,11 @@ class CastEnvironment : public base::RefCountedThreadSafe<CastEnvironment> {
|
| }
|
|
|
| protected:
|
| + CastEnvironment(scoped_ptr<base::TickClock> clock,
|
| + const CastLoggingConfig& logging_config);
|
| virtual ~CastEnvironment();
|
|
|
| - private:
|
| - friend class base::RefCountedThreadSafe<CastEnvironment>;
|
| -
|
| - scoped_ptr<base::TickClock> clock_;
|
| + // Subclasses may override these.
|
| scoped_refptr<base::SingleThreadTaskRunner> main_thread_proxy_;
|
| scoped_refptr<base::SingleThreadTaskRunner> audio_encode_thread_proxy_;
|
| scoped_refptr<base::SingleThreadTaskRunner> audio_decode_thread_proxy_;
|
| @@ -94,6 +95,10 @@ class CastEnvironment : public base::RefCountedThreadSafe<CastEnvironment> {
|
| scoped_refptr<base::SingleThreadTaskRunner> video_decode_thread_proxy_;
|
| scoped_refptr<base::SingleThreadTaskRunner> transport_thread_proxy_;
|
|
|
| + private:
|
| + friend class base::RefCountedThreadSafe<CastEnvironment>;
|
| +
|
| + scoped_ptr<base::TickClock> clock_;
|
| scoped_ptr<LoggingImpl> logging_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(CastEnvironment);
|
|
|