OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/media/media_stream_dispatcher.h" | 5 #include "content/renderer/media/media_stream_dispatcher.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop_proxy.h" |
8 #include "content/common/media/media_stream_messages.h" | 9 #include "content/common/media/media_stream_messages.h" |
9 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" | 10 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" |
10 #include "content/renderer/render_view_impl.h" | 11 #include "content/renderer/render_view_impl.h" |
11 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 struct MediaStreamDispatcher::Request { | 16 struct MediaStreamDispatcher::Request { |
16 Request(const base::WeakPtr<MediaStreamDispatcherEventHandler>& handler, | 17 Request(const base::WeakPtr<MediaStreamDispatcherEventHandler>& handler, |
17 int request_id, | 18 int request_id, |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 int index) { | 386 int index) { |
386 LabelStreamMap::iterator it = label_stream_map_.find(label); | 387 LabelStreamMap::iterator it = label_stream_map_.find(label); |
387 if (it == label_stream_map_.end()) | 388 if (it == label_stream_map_.end()) |
388 return StreamDeviceInfo::kNoId; | 389 return StreamDeviceInfo::kNoId; |
389 | 390 |
390 DCHECK_GT(it->second.video_array.size(), static_cast<size_t>(index)); | 391 DCHECK_GT(it->second.video_array.size(), static_cast<size_t>(index)); |
391 return it->second.video_array[index].session_id; | 392 return it->second.video_array[index].session_id; |
392 } | 393 } |
393 | 394 |
394 } // namespace content | 395 } // namespace content |
OLD | NEW |