summaryrefslogtreecommitdiff
path: root/media/cast/cast_environment.h
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-03-18 10:20:56 +0000
committerTorne (Richard Coles) <torne@google.com>2014-03-18 10:20:56 +0000
commita1401311d1ab56c4ed0a474bd38c108f75cb0cd9 (patch)
tree3437151d9ae1ce20a1e53a0d98c19ca01c786394 /media/cast/cast_environment.h
parentaf5066f1e36c6579e74752647e6c584438f80f94 (diff)
downloadchromium_org-a1401311d1ab56c4ed0a474bd38c108f75cb0cd9.tar.gz
Merge from Chromium at DEPS revision 257591
This commit was generated by merge_to_master.py. Change-Id: I0010df2ec3fbb5d4947cd026de2feb150ce7a6b5
Diffstat (limited to 'media/cast/cast_environment.h')
-rw-r--r--media/cast/cast_environment.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/media/cast/cast_environment.h b/media/cast/cast_environment.h
index 5abb5c7376..95d4ccb903 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;
@@ -83,10 +85,7 @@ class CastEnvironment : public base::RefCountedThreadSafe<CastEnvironment> {
protected:
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 +93,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);