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 |
11 CastIPCDispatcher* CastIPCDispatcher::global_instance_ = NULL; | 11 CastIPCDispatcher* CastIPCDispatcher::global_instance_ = NULL; |
12 | 12 |
13 CastIPCDispatcher::CastIPCDispatcher( | 13 CastIPCDispatcher::CastIPCDispatcher( |
14 const scoped_refptr<base::MessageLoopProxy>& io_message_loop) | 14 const scoped_refptr<base::MessageLoopProxy>& io_message_loop) |
15 : sender_(NULL), | 15 : sender_(NULL), |
16 io_message_loop_(io_message_loop) { | 16 io_message_loop_(io_message_loop) { |
17 DCHECK(io_message_loop_); | 17 DCHECK(io_message_loop_.get()); |
18 DCHECK(!global_instance_); | 18 DCHECK(!global_instance_); |
19 } | 19 } |
20 | 20 |
21 CastIPCDispatcher::~CastIPCDispatcher() { | 21 CastIPCDispatcher::~CastIPCDispatcher() { |
22 DCHECK(io_message_loop_->BelongsToCurrentThread()); | 22 DCHECK(io_message_loop_->BelongsToCurrentThread()); |
23 DCHECK(!global_instance_); | 23 DCHECK(!global_instance_); |
24 } | 24 } |
25 | 25 |
26 CastIPCDispatcher* CastIPCDispatcher::Get() { | 26 CastIPCDispatcher* CastIPCDispatcher::Get() { |
27 return global_instance_; | 27 return global_instance_; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 int32 channel_id, | 115 int32 channel_id, |
116 uint32 ssrc, | 116 uint32 ssrc, |
117 const media::cast::RtcpCastMessage& cast_message) { | 117 const media::cast::RtcpCastMessage& cast_message) { |
118 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); | 118 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); |
119 if (sender) { | 119 if (sender) { |
120 sender->OnRtcpCastMessage(ssrc, cast_message); | 120 sender->OnRtcpCastMessage(ssrc, cast_message); |
121 } else { | 121 } else { |
122 DVLOG(1) << "CastIPCDispatcher::OnRtt on non-existing channel."; | 122 DVLOG(1) << "CastIPCDispatcher::OnRtt on non-existing channel."; |
123 } | 123 } |
124 } | 124 } |
OLD | NEW |