Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1220)

Unified Diff: media/cast/cast_environment.h

Issue 184813009: Cast Streaming API end-to-end browser_test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LoggingImplTest + REBASE Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/cast_streaming/manifest.json ('k') | media/cast/cast_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_environment.h
diff --git a/media/cast/cast_environment.h b/media/cast/cast_environment.h
index 5abb5c7376f33dec4393175d9e4f590b1b1ed359..95d4ccb9033e9af9e24cb3555a24559b4916ff67 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);
« no previous file with comments | « chrome/test/data/extensions/api_test/cast_streaming/manifest.json ('k') | media/cast/cast_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698