Chromium Code Reviews| Index: chrome/renderer/media/cast_session_delegate.h |
| diff --git a/chrome/renderer/media/cast_session_delegate.h b/chrome/renderer/media/cast_session_delegate.h |
| index d382287acde6e2bfdd48136587cfebb3cbb2acea..6fd80fe2ebe076502fb905884496706c8794da37 100644 |
| --- a/chrome/renderer/media/cast_session_delegate.h |
| +++ b/chrome/renderer/media/cast_session_delegate.h |
| @@ -9,6 +9,7 @@ |
| #include "base/basictypes.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/threading/thread.h" |
| #include "base/threading/thread_checker.h" |
| #include "base/time/default_tick_clock.h" |
| @@ -55,20 +56,13 @@ class CastSessionDelegate { |
| const FrameInputAvailableCallback& callback); |
| protected: |
| - // Callback with the result of the initialization. |
| - // If this callback is called with STATUS_INITIALIZED it will report back |
| - // to the sinks that it's ready to accept incoming audio / video frames. |
| + // Callback with the result of the initialization. If this callback is called |
| + // with STATUS_AUDIO_INITIALIZED and/or STATUS_VIDEO_INITIALIZED it will |
| + // report back to the sinks that it's ready to accept incoming audio / video |
| + // frames. |
| void InitializationResult(media::cast::CastInitializationStatus result) const; |
| private: |
| - // Start encoding threads and initialize the CastEnvironment. |
| - void Initialize(); |
| - |
| - // Configure CastSender. It is ready to accept audio / video frames after |
| - // receiving a successful call to InitializationResult. |
| - void StartSendingInternal(const FrameInputAvailableCallback& callback, |
| - bool is_audio); |
| - |
| base::ThreadChecker thread_checker_; |
| scoped_refptr<media::cast::CastEnvironment> cast_environment_; |
| scoped_ptr<media::cast::CastSender> cast_sender_; |
| @@ -81,16 +75,15 @@ class CastSessionDelegate { |
| base::Thread audio_encode_thread_; |
| base::Thread video_encode_thread_; |
| - // Configuration for audio and video. |
| - scoped_ptr<media::cast::AudioSenderConfig> audio_config_; |
| - scoped_ptr<media::cast::VideoSenderConfig> video_config_; |
| - |
| scoped_ptr<FrameInputAvailableCallback> audio_frame_input_available_callback_; |
|
Alpha Left Google
2014/02/18 22:28:13
I don't you didn't change this line but this looks
mikhal1
2014/03/05 21:44:05
Changes by rebasing.
On 2014/02/18 22:28:13, Alpha
|
| scoped_ptr<FrameInputAvailableCallback> video_frame_input_available_callback_; |
| // Proxy to the IO message loop. |
| scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| + // Weak pointer bound to io_message_loop_proxy_. |
|
Alpha Left Google
2014/02/18 22:28:13
nit: |io_message_loop_proxy_|.
|
| + base::WeakPtrFactory<CastSessionDelegate> weak_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); |
| }; |