Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / renderer / media / video_capture_message_filter.cc
index 94075ff..a8620ed 100644 (file)
@@ -63,6 +63,8 @@ bool VideoCaptureMessageFilter::OnMessageReceived(const IPC::Message& message) {
     IPC_MESSAGE_HANDLER(VideoCaptureMsg_FreeBuffer, OnBufferDestroyed)
     IPC_MESSAGE_HANDLER(VideoCaptureMsg_DeviceSupportedFormatsEnumerated,
                         OnDeviceSupportedFormatsEnumerated)
+    IPC_MESSAGE_HANDLER(VideoCaptureMsg_DeviceFormatsInUseReceived,
+                        OnDeviceFormatsInUseReceived)
     IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP()
   return handled;
@@ -171,4 +173,15 @@ void VideoCaptureMessageFilter::OnDeviceSupportedFormatsEnumerated(
   delegate->OnDeviceSupportedFormatsEnumerated(supported_formats);
 }
 
+void VideoCaptureMessageFilter::OnDeviceFormatsInUseReceived(
+    int device_id,
+    const media::VideoCaptureFormats& formats_in_use) {
+  Delegate* delegate = find_delegate(device_id);
+  if (!delegate) {
+    DLOG(WARNING) << "OnDeviceFormatInUse: unknown device";
+    return;
+  }
+  delegate->OnDeviceFormatsInUseReceived(formats_in_use);
+}
+
 }  // namespace content