| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/media/cast_session.h" | 5 #include "chrome/renderer/media/cast_session.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "chrome/renderer/media/cast_session_delegate.h" | 8 #include "chrome/renderer/media/cast_session_delegate.h" |
| 9 #include "content/public/renderer/render_thread.h" | 9 #include "content/public/renderer/render_thread.h" |
| 10 #include "media/base/bind_to_loop.h" | 10 #include "media/base/bind_to_current_loop.h" |
| 11 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
| 12 #include "media/cast/cast_config.h" | 12 #include "media/cast/cast_config.h" |
| 13 #include "media/cast/cast_sender.h" | 13 #include "media/cast/cast_sender.h" |
| 14 | 14 |
| 15 CastSession::CastSession() | 15 CastSession::CastSession() |
| 16 : delegate_(new CastSessionDelegate()), | 16 : delegate_(new CastSessionDelegate()), |
| 17 io_message_loop_proxy_( | 17 io_message_loop_proxy_( |
| 18 content::RenderThread::Get()->GetIOMessageLoopProxy()) { | 18 content::RenderThread::Get()->GetIOMessageLoopProxy()) { |
| 19 } | 19 } |
| 20 | 20 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 51 media::BindToCurrentLoop(callback))); | 51 media::BindToCurrentLoop(callback))); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void CastSession::ReceivePacket(const std::vector<char>& packet) { | 54 void CastSession::ReceivePacket(const std::vector<char>& packet) { |
| 55 io_message_loop_proxy_->PostTask(FROM_HERE, | 55 io_message_loop_proxy_->PostTask(FROM_HERE, |
| 56 base::Bind( | 56 base::Bind( |
| 57 &CastSessionDelegate::ReceivePacket, | 57 &CastSessionDelegate::ReceivePacket, |
| 58 base::Unretained(delegate_.get()), | 58 base::Unretained(delegate_.get()), |
| 59 packet)); | 59 packet)); |
| 60 } | 60 } |
| OLD | NEW |