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 "ppapi/proxy/video_capture_resource.h" | 5 #include "ppapi/proxy/video_capture_resource.h" |
6 | 6 |
7 #include "ppapi/c/dev/ppp_video_capture_dev.h" | 7 #include "ppapi/c/dev/ppp_video_capture_dev.h" |
8 #include "ppapi/proxy/dispatch_reply_message.h" | 8 #include "ppapi/proxy/dispatch_reply_message.h" |
9 #include "ppapi/proxy/plugin_dispatcher.h" | 9 #include "ppapi/proxy/plugin_dispatcher.h" |
10 #include "ppapi/proxy/plugin_globals.h" | 10 #include "ppapi/proxy/plugin_globals.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( | 55 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( |
56 PpapiPluginMsg_VideoCapture_OnError, | 56 PpapiPluginMsg_VideoCapture_OnError, |
57 OnPluginMsgOnError) | 57 OnPluginMsgOnError) |
58 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( | 58 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( |
59 PpapiPluginMsg_VideoCapture_OnBufferReady, | 59 PpapiPluginMsg_VideoCapture_OnBufferReady, |
60 OnPluginMsgOnBufferReady) | 60 OnPluginMsgOnBufferReady) |
61 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL_UNHANDLED(NOTREACHED()) | 61 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL_UNHANDLED(NOTREACHED()) |
62 IPC_END_MESSAGE_MAP() | 62 IPC_END_MESSAGE_MAP() |
63 } | 63 } |
64 | 64 |
65 int32_t VideoCaptureResource::EnumerateDevices0_2( | |
66 PP_Resource* devices, | |
67 scoped_refptr<TrackedCallback> callback) { | |
68 return enumeration_helper_.EnumerateDevices0_2(devices, callback); | |
69 } | |
70 | |
71 int32_t VideoCaptureResource::EnumerateDevices( | 65 int32_t VideoCaptureResource::EnumerateDevices( |
72 const PP_ArrayOutput& output, | 66 const PP_ArrayOutput& output, |
73 scoped_refptr<TrackedCallback> callback) { | 67 scoped_refptr<TrackedCallback> callback) { |
74 return enumeration_helper_.EnumerateDevices(output, callback); | 68 return enumeration_helper_.EnumerateDevices(output, callback); |
75 } | 69 } |
76 | 70 |
77 int32_t VideoCaptureResource::MonitorDeviceChange( | 71 int32_t VideoCaptureResource::MonitorDeviceChange( |
78 PP_MonitorDeviceChangeCallback callback, | 72 PP_MonitorDeviceChangeCallback callback, |
79 void* user_data) { | 73 void* user_data) { |
80 return enumeration_helper_.MonitorDeviceChange(callback, user_data); | 74 return enumeration_helper_.MonitorDeviceChange(callback, user_data); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 open_callback_->Run(params.result()); | 225 open_callback_->Run(params.result()); |
232 } | 226 } |
233 | 227 |
234 void VideoCaptureResource::SetBufferInUse(uint32_t buffer_index) { | 228 void VideoCaptureResource::SetBufferInUse(uint32_t buffer_index) { |
235 CHECK(buffer_index < buffer_in_use_.size()); | 229 CHECK(buffer_index < buffer_in_use_.size()); |
236 buffer_in_use_[buffer_index] = true; | 230 buffer_in_use_[buffer_index] = true; |
237 } | 231 } |
238 | 232 |
239 } // namespace proxy | 233 } // namespace proxy |
240 } // namespace ppapi | 234 } // namespace ppapi |
OLD | NEW |