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

Side by Side Diff: chrome/renderer/media/cast_ipc_dispatcher.h

Issue 178073004: Cast: IPC from browser to renderer to send packet events from transport to cast library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « chrome/common/cast_messages.h ('k') | chrome/renderer/media/cast_ipc_dispatcher.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_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ 5 #ifndef CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_
6 #define CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ 6 #define CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "ipc/ipc_channel_proxy.h" 10 #include "ipc/ipc_channel_proxy.h"
11 #include "media/cast/cast_sender.h" 11 #include "media/cast/cast_sender.h"
12 #include "media/cast/logging/logging_defines.h"
12 #include "media/cast/transport/cast_transport_sender.h" 13 #include "media/cast/transport/cast_transport_sender.h"
13 14
14 class CastTransportSenderIPC; 15 class CastTransportSenderIPC;
15 16
16 // This dispatcher listens to incoming IPC messages and sends 17 // This dispatcher listens to incoming IPC messages and sends
17 // the call to the correct CastTransportSenderIPC instance. 18 // the call to the correct CastTransportSenderIPC instance.
18 class CastIPCDispatcher : public IPC::ChannelProxy::MessageFilter { 19 class CastIPCDispatcher : public IPC::ChannelProxy::MessageFilter {
19 public: 20 public:
20 explicit CastIPCDispatcher( 21 explicit CastIPCDispatcher(
21 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); 22 const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
(...skipping 16 matching lines...) Expand all
38 void OnReceivedPacket(int32 channel_id, const media::cast::Packet& packet); 39 void OnReceivedPacket(int32 channel_id, const media::cast::Packet& packet);
39 void OnNotifyStatusChange( 40 void OnNotifyStatusChange(
40 int32 channel_id, 41 int32 channel_id,
41 media::cast::transport::CastTransportStatus status); 42 media::cast::transport::CastTransportStatus status);
42 void OnRtpStatistics( 43 void OnRtpStatistics(
43 int32 channel_id, 44 int32 channel_id,
44 bool audio, 45 bool audio,
45 const media::cast::transport::RtcpSenderInfo& sender_info, 46 const media::cast::transport::RtcpSenderInfo& sender_info,
46 base::TimeTicks time_sent, 47 base::TimeTicks time_sent,
47 uint32 rtp_timestamp); 48 uint32 rtp_timestamp);
49 void OnRawEvents(int32 channel_id,
50 const std::vector<media::cast::PacketEvent>& packet_events);
48 51
49 static CastIPCDispatcher* global_instance_; 52 static CastIPCDispatcher* global_instance_;
50 53
51 // IPC channel for Send(); must only be accesed on |io_message_loop_|. 54 // IPC channel for Send(); must only be accesed on |io_message_loop_|.
52 IPC::Channel* channel_; 55 IPC::Channel* channel_;
53 56
54 // Message loop on which IPC calls are driven. 57 // Message loop on which IPC calls are driven.
55 const scoped_refptr<base::MessageLoopProxy> io_message_loop_; 58 const scoped_refptr<base::MessageLoopProxy> io_message_loop_;
56 59
57 // A map of stream ids to delegates; must only be accessed on 60 // A map of stream ids to delegates; must only be accessed on
58 // |io_message_loop_|. 61 // |io_message_loop_|.
59 IDMap<CastTransportSenderIPC> id_map_; 62 IDMap<CastTransportSenderIPC> id_map_;
60 DISALLOW_COPY_AND_ASSIGN(CastIPCDispatcher); 63 DISALLOW_COPY_AND_ASSIGN(CastIPCDispatcher);
61 }; 64 };
62 65
63 #endif // CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ 66 #endif // CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/common/cast_messages.h ('k') | chrome/renderer/media/cast_ipc_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698