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 #include "chrome/renderer/media/cast_ipc_dispatcher.h" | 5 #include "chrome/renderer/media/cast_ipc_dispatcher.h" |
6 | 6 |
7 #include "chrome/common/cast_messages.h" | 7 #include "chrome/common/cast_messages.h" |
8 #include "chrome/renderer/media/cast_transport_sender_ipc.h" | 8 #include "chrome/renderer/media/cast_transport_sender_ipc.h" |
9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 sender_ = NULL; | 70 sender_ = NULL; |
71 } | 71 } |
72 | 72 |
73 void CastIPCDispatcher::OnChannelClosing() { | 73 void CastIPCDispatcher::OnChannelClosing() { |
74 DCHECK(io_message_loop_->BelongsToCurrentThread()); | 74 DCHECK(io_message_loop_->BelongsToCurrentThread()); |
75 DCHECK_EQ(this, global_instance_); | 75 DCHECK_EQ(this, global_instance_); |
76 } | 76 } |
77 | 77 |
78 void CastIPCDispatcher::OnReceivedPacket( | 78 void CastIPCDispatcher::OnReceivedPacket( |
79 int32 channel_id, | 79 int32 channel_id, |
80 const media::cast::transport::Packet& packet) { | 80 const media::cast::Packet& packet) { |
81 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); | 81 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); |
82 if (sender) { | 82 if (sender) { |
83 sender->OnReceivedPacket(packet); | 83 sender->OnReceivedPacket(packet); |
84 } else { | 84 } else { |
85 DVLOG(1) << "CastIPCDispatcher::OnReceivedPacket " | 85 DVLOG(1) << "CastIPCDispatcher::OnReceivedPacket " |
86 << "on non-existing channel."; | 86 << "on non-existing channel."; |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 void CastIPCDispatcher::OnNotifyStatusChange( | 90 void CastIPCDispatcher::OnNotifyStatusChange( |
91 int32 channel_id, | 91 int32 channel_id, |
92 media::cast::transport::CastTransportStatus status) { | 92 media::cast::CastTransportStatus status) { |
93 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); | 93 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); |
94 if (sender) { | 94 if (sender) { |
95 sender->OnNotifyStatusChange(status); | 95 sender->OnNotifyStatusChange(status); |
96 } else { | 96 } else { |
97 DVLOG(1) | 97 DVLOG(1) |
98 << "CastIPCDispatcher::OnNotifystatusChange on non-existing channel."; | 98 << "CastIPCDispatcher::OnNotifystatusChange on non-existing channel."; |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 void CastIPCDispatcher::OnRawEvents( | 102 void CastIPCDispatcher::OnRawEvents( |
103 int32 channel_id, | 103 int32 channel_id, |
104 const std::vector<media::cast::PacketEvent>& packet_events) { | 104 const std::vector<media::cast::PacketEvent>& packet_events) { |
105 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); | 105 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); |
106 if (sender) { | 106 if (sender) { |
107 sender->OnRawEvents(packet_events); | 107 sender->OnRawEvents(packet_events); |
108 } else { | 108 } else { |
109 DVLOG(1) << "CastIPCDispatcher::OnRawEvents on non-existing channel."; | 109 DVLOG(1) << "CastIPCDispatcher::OnRawEvents on non-existing channel."; |
110 } | 110 } |
111 } | 111 } |
OLD | NEW |