| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ | 6 #define CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ |
| 7 | 7 |
| 8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/time/default_tick_clock.h" | 11 #include "base/time/default_tick_clock.h" |
| 12 #include "content/public/browser/browser_message_filter.h" | 12 #include "content/public/browser/browser_message_filter.h" |
| 13 #include "media/cast/cast_sender.h" | 13 #include "media/cast/cast_sender.h" |
| 14 #include "media/cast/logging/logging_defines.h" | 14 #include "media/cast/logging/logging_defines.h" |
| 15 #include "media/cast/net/cast_transport_sender.h" | 15 #include "media/cast/net/cast_transport_sender.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 class PowerSaveBlocker; | 18 class PowerSaveBlocker; |
| 19 } // namespace content | 19 } // namespace content |
| 20 | 20 |
| 21 namespace cast { | 21 namespace cast { |
| 22 | 22 |
| 23 class CastTransportHostFilter : public content::BrowserMessageFilter { | 23 class CastTransportHostFilter : public content::BrowserMessageFilter { |
| 24 public: | 24 public: |
| 25 CastTransportHostFilter(); | 25 CastTransportHostFilter(); |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 ~CastTransportHostFilter() override; | 28 ~CastTransportHostFilter() override; |
| 29 | 29 |
| 30 void NotifyStatusChange( | |
| 31 int32 channel_id, | |
| 32 media::cast::CastTransportStatus result); | |
| 33 void SendRawEvents( | |
| 34 int32 channel_id, | |
| 35 scoped_ptr<std::vector<media::cast::FrameEvent>> frame_events, | |
| 36 scoped_ptr<std::vector<media::cast::PacketEvent>> packet_events); | |
| 37 void SendRtt(int32 channel_id, uint32 ssrc, base::TimeDelta rtt); | 30 void SendRtt(int32 channel_id, uint32 ssrc, base::TimeDelta rtt); |
| 38 void SendCastMessage(int32 channel_id, | 31 void SendCastMessage(int32 channel_id, |
| 39 uint32 ssrc, | 32 uint32 ssrc, |
| 40 const media::cast::RtcpCastMessage& cast_message); | 33 const media::cast::RtcpCastMessage& cast_message); |
| 41 void ReceivedPacket(int32 channel_id, scoped_ptr<media::cast::Packet> packet); | |
| 42 | 34 |
| 43 // BrowserMessageFilter implementation. | 35 // BrowserMessageFilter implementation. |
| 44 bool OnMessageReceived(const IPC::Message& message) override; | 36 bool OnMessageReceived(const IPC::Message& message) override; |
| 45 | 37 |
| 46 // Forwarding functions. | 38 // Forwarding functions. |
| 47 void OnInitializeAudio( | 39 void OnInitializeAudio( |
| 48 int32 channel_id, | 40 int32 channel_id, |
| 49 const media::cast::CastTransportRtpConfig& config); | 41 const media::cast::CastTransportRtpConfig& config); |
| 50 void OnInitializeVideo( | 42 void OnInitializeVideo( |
| 51 int32 channel_id, | 43 int32 channel_id, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; | 78 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; |
| 87 | 79 |
| 88 base::WeakPtrFactory<CastTransportHostFilter> weak_factory_; | 80 base::WeakPtrFactory<CastTransportHostFilter> weak_factory_; |
| 89 | 81 |
| 90 DISALLOW_COPY_AND_ASSIGN(CastTransportHostFilter); | 82 DISALLOW_COPY_AND_ASSIGN(CastTransportHostFilter); |
| 91 }; | 83 }; |
| 92 | 84 |
| 93 } // namespace cast | 85 } // namespace cast |
| 94 | 86 |
| 95 #endif // CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ | 87 #endif // CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ |
| OLD | NEW |