Chromium Code Reviews| Index: chrome/renderer/media/cast_threads.h |
| diff --git a/chrome/renderer/media/cast_threads.h b/chrome/renderer/media/cast_threads.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d95ca33a183e375e2bfb11e68c42ee9aa9ad2721 |
| --- /dev/null |
| +++ b/chrome/renderer/media/cast_threads.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Manages threads used by Cast Streaming Extensions API. There is a |
| +// singleton object of this class in the renderer. |
| +// |
| +// There are two threads owned by this class: |
| +// 1. Audio encode thread. |
| +// 2. Video encode thread. |
| +// These two threads are started this object is created. |
| + |
| +#ifndef CHROME_RENDERER_MEDIA_CAST_THREADS_H_ |
| +#define CHROME_RENDERER_MEDIA_CAST_THREADS_H_ |
| + |
| +#include "base/lazy_instance.h" |
| +#include "base/threading/thread.h" |
| + |
| +class CastThreads { |
| + public: |
| + scoped_refptr<base::MessageLoopProxy> GetAudioEncodeMessageLoopProxy(); |
|
scherkus (not reviewing)
2014/02/22 01:08:27
should these be base::SingleThreadTaskRunners inst
|
| + scoped_refptr<base::MessageLoopProxy> GetVideoEncodeMessageLoopProxy(); |
| + |
| + private: |
| + friend struct base::DefaultLazyInstanceTraits<CastThreads>; |
| + |
| + CastThreads(); |
| + |
| + base::Thread audio_encode_thread_; |
| + base::Thread video_encode_thread_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(CastThreads); |
| +}; |
| + |
| +#endif // CHROME_RENDERER_MEDIA_CAST_THREADS_H_ |