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

Side by Side Diff: chrome/browser/media/cast_transport_host_filter.h

Issue 1515023002: Simplify interface for media/cast: CastTransportSenderImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/media/cast_transport_host_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time/default_tick_clock.h" 14 #include "base/time/default_tick_clock.h"
15 #include "content/public/browser/browser_message_filter.h" 15 #include "content/public/browser/browser_message_filter.h"
16 #include "media/cast/cast_sender.h" 16 #include "media/cast/cast_sender.h"
17 #include "media/cast/logging/logging_defines.h" 17 #include "media/cast/logging/logging_defines.h"
18 #include "media/cast/net/cast_transport_sender.h" 18 #include "media/cast/net/cast_transport_sender.h"
19 #include "media/cast/net/udp_transport.h"
19 20
20 namespace content { 21 namespace content {
21 class PowerSaveBlocker; 22 class PowerSaveBlocker;
22 } // namespace content 23 } // namespace content
23 24
24 namespace cast { 25 namespace cast {
25 26
26 class CastTransportHostFilter : public content::BrowserMessageFilter { 27 class CastTransportHostFilter : public content::BrowserMessageFilter {
27 public: 28 public:
28 CastTransportHostFilter(); 29 CastTransportHostFilter();
29 30
30 private: 31 private:
31 ~CastTransportHostFilter() override; 32 ~CastTransportHostFilter() override;
32 33
33 void NotifyStatusChange(int32_t channel_id, 34 // Status callback to create UdpTransport.
34 media::cast::CastTransportStatus result); 35 void OnStatusChanged(int32_t channel_id,
35 void SendRawEvents( 36 media::cast::CastTransportStatus status);
36 int32_t channel_id,
37 scoped_ptr<std::vector<media::cast::FrameEvent>> frame_events,
38 scoped_ptr<std::vector<media::cast::PacketEvent>> packet_events);
39 void SendRtt(int32_t channel_id, uint32_t ssrc, base::TimeDelta rtt); 37 void SendRtt(int32_t channel_id, uint32_t ssrc, base::TimeDelta rtt);
40 void SendCastMessage(int32_t channel_id, 38 void SendCastMessage(int32_t channel_id,
41 uint32_t ssrc, 39 uint32_t ssrc,
42 const media::cast::RtcpCastMessage& cast_message); 40 const media::cast::RtcpCastMessage& cast_message);
43 void ReceivedPacket(int32_t channel_id,
44 scoped_ptr<media::cast::Packet> packet);
45 41
46 // BrowserMessageFilter implementation. 42 // BrowserMessageFilter implementation.
47 bool OnMessageReceived(const IPC::Message& message) override; 43 bool OnMessageReceived(const IPC::Message& message) override;
48 44
49 // Forwarding functions. 45 // Forwarding functions.
50 void OnInitializeAudio(int32_t channel_id, 46 void OnInitializeAudio(int32_t channel_id,
51 const media::cast::CastTransportRtpConfig& config); 47 const media::cast::CastTransportRtpConfig& config);
52 void OnInitializeVideo(int32_t channel_id, 48 void OnInitializeVideo(int32_t channel_id,
53 const media::cast::CastTransportRtpConfig& config); 49 const media::cast::CastTransportRtpConfig& config);
54 void OnInsertFrame(int32_t channel_id, 50 void OnInsertFrame(int32_t channel_id,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; 83 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_;
88 84
89 base::WeakPtrFactory<CastTransportHostFilter> weak_factory_; 85 base::WeakPtrFactory<CastTransportHostFilter> weak_factory_;
90 86
91 DISALLOW_COPY_AND_ASSIGN(CastTransportHostFilter); 87 DISALLOW_COPY_AND_ASSIGN(CastTransportHostFilter);
92 }; 88 };
93 89
94 } // namespace cast 90 } // namespace cast
95 91
96 #endif // CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ 92 #endif // CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/cast_transport_host_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698