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/video_capture_message_filter.h" | 5 #include "content/renderer/media/video_capture_message_filter.h" |
6 | 6 |
7 #include "content/common/media/video_capture_messages.h" | 7 #include "content/common/media/video_capture_messages.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
| 9 #include "ipc/ipc_channel.h" |
9 | 10 |
10 namespace content { | 11 namespace content { |
11 | 12 |
12 VideoCaptureMessageFilter::VideoCaptureMessageFilter() | 13 VideoCaptureMessageFilter::VideoCaptureMessageFilter() |
13 : last_device_id_(0), | 14 : last_device_id_(0), |
14 channel_(NULL) { | 15 channel_(NULL) { |
15 } | 16 } |
16 | 17 |
17 void VideoCaptureMessageFilter::AddDelegate(Delegate* delegate) { | 18 void VideoCaptureMessageFilter::AddDelegate(Delegate* delegate) { |
18 if (++last_device_id_ <= 0) | 19 if (++last_device_id_ <= 0) |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 const media::VideoCaptureFormats& formats_in_use) { | 203 const media::VideoCaptureFormats& formats_in_use) { |
203 Delegate* delegate = find_delegate(device_id); | 204 Delegate* delegate = find_delegate(device_id); |
204 if (!delegate) { | 205 if (!delegate) { |
205 DLOG(WARNING) << "OnDeviceFormatInUse: unknown device"; | 206 DLOG(WARNING) << "OnDeviceFormatInUse: unknown device"; |
206 return; | 207 return; |
207 } | 208 } |
208 delegate->OnDeviceFormatsInUseReceived(formats_in_use); | 209 delegate->OnDeviceFormatsInUseReceived(formats_in_use); |
209 } | 210 } |
210 | 211 |
211 } // namespace content | 212 } // namespace content |
OLD | NEW |