| 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_sender.h" | 9 #include "ipc/ipc_sender.h" |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 IPC_MESSAGE_HANDLER(VideoCaptureMsg_FreeBuffer, OnBufferDestroyed) | 65 IPC_MESSAGE_HANDLER(VideoCaptureMsg_FreeBuffer, OnBufferDestroyed) |
| 66 IPC_MESSAGE_HANDLER(VideoCaptureMsg_DeviceSupportedFormatsEnumerated, | 66 IPC_MESSAGE_HANDLER(VideoCaptureMsg_DeviceSupportedFormatsEnumerated, |
| 67 OnDeviceSupportedFormatsEnumerated) | 67 OnDeviceSupportedFormatsEnumerated) |
| 68 IPC_MESSAGE_HANDLER(VideoCaptureMsg_DeviceFormatsInUseReceived, | 68 IPC_MESSAGE_HANDLER(VideoCaptureMsg_DeviceFormatsInUseReceived, |
| 69 OnDeviceFormatsInUseReceived) | 69 OnDeviceFormatsInUseReceived) |
| 70 IPC_MESSAGE_UNHANDLED(handled = false) | 70 IPC_MESSAGE_UNHANDLED(handled = false) |
| 71 IPC_END_MESSAGE_MAP() | 71 IPC_END_MESSAGE_MAP() |
| 72 return handled; | 72 return handled; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void VideoCaptureMessageFilter::OnFilterAdded(IPC::Sender* sender) { | 75 void VideoCaptureMessageFilter::OnFilterAdded(IPC::Channel* channel) { |
| 76 DVLOG(1) << "VideoCaptureMessageFilter::OnFilterAdded()"; | 76 DVLOG(1) << "VideoCaptureMessageFilter::OnFilterAdded()"; |
| 77 sender_ = sender; | 77 sender_ = channel; |
| 78 | 78 |
| 79 for (const auto& pending_delegate : pending_delegates_) { | 79 for (const auto& pending_delegate : pending_delegates_) { |
| 80 pending_delegate.second->OnDelegateAdded(pending_delegate.first); | 80 pending_delegate.second->OnDelegateAdded(pending_delegate.first); |
| 81 delegates_[pending_delegate.first] = pending_delegate.second; | 81 delegates_[pending_delegate.first] = pending_delegate.second; |
| 82 } | 82 } |
| 83 pending_delegates_.clear(); | 83 pending_delegates_.clear(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void VideoCaptureMessageFilter::OnFilterRemoved() { | 86 void VideoCaptureMessageFilter::OnFilterRemoved() { |
| 87 sender_ = NULL; | 87 sender_ = NULL; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 const media::VideoCaptureFormats& formats_in_use) { | 202 const media::VideoCaptureFormats& formats_in_use) { |
| 203 Delegate* const delegate = find_delegate(device_id); | 203 Delegate* const delegate = find_delegate(device_id); |
| 204 if (!delegate) { | 204 if (!delegate) { |
| 205 DLOG(WARNING) << "OnDeviceFormatInUse: unknown device"; | 205 DLOG(WARNING) << "OnDeviceFormatInUse: unknown device"; |
| 206 return; | 206 return; |
| 207 } | 207 } |
| 208 delegate->OnDeviceFormatsInUseReceived(formats_in_use); | 208 delegate->OnDeviceFormatsInUseReceived(formats_in_use); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace content | 211 } // namespace content |
| OLD | NEW |