diff options
-rw-r--r-- | ppapi/proxy/ppb_video_capture_proxy.cc | 10 | ||||
-rw-r--r-- | ppapi/shared_impl/ppb_video_capture_shared.cc | 4 | ||||
-rw-r--r-- | ppapi/shared_impl/ppb_video_capture_shared.h | 16 | ||||
-rw-r--r-- | ppapi/thunk/ppb_video_capture_api.h | 4 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_video_capture_impl.cc | 4 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_video_capture_impl.h | 4 |
6 files changed, 22 insertions, 20 deletions
diff --git a/ppapi/proxy/ppb_video_capture_proxy.cc b/ppapi/proxy/ppb_video_capture_proxy.cc index 8477d53..6a51299 100644 --- a/ppapi/proxy/ppb_video_capture_proxy.cc +++ b/ppapi/proxy/ppb_video_capture_proxy.cc @@ -164,12 +164,12 @@ class VideoCapture : public PPB_VideoCapture_Shared { // PPB_VideoCapture_Shared implementation. virtual int32_t InternalEnumerateDevices( PP_Resource* devices, - PP_CompletionCallback callback) OVERRIDE; + const PP_CompletionCallback& callback) OVERRIDE; virtual int32_t InternalOpen( const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) OVERRIDE; + const PP_CompletionCallback& callback) OVERRIDE; virtual int32_t InternalStartCapture() OVERRIDE; virtual int32_t InternalReuseBuffer(uint32_t buffer) OVERRIDE; virtual int32_t InternalStopCapture() OVERRIDE; @@ -213,8 +213,8 @@ bool VideoCapture::OnStatus(PP_VideoCaptureStatus_Dev status) { return false; } -int32_t VideoCapture::InternalEnumerateDevices(PP_Resource* devices, - PP_CompletionCallback callback) { +int32_t VideoCapture::InternalEnumerateDevices( + PP_Resource* devices, const PP_CompletionCallback& callback) { devices_ = devices; enumerate_devices_callback_ = new TrackedCallback(this, callback); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoCapture_EnumerateDevices( @@ -226,7 +226,7 @@ int32_t VideoCapture::InternalOpen( const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) { + const PP_CompletionCallback& callback) { // Disallow blocking call. The base class doesn't check this. if (!callback.func) return PP_ERROR_BLOCKS_MAIN_THREAD; diff --git a/ppapi/shared_impl/ppb_video_capture_shared.cc b/ppapi/shared_impl/ppb_video_capture_shared.cc index a084d5e..08f6bb2 100644 --- a/ppapi/shared_impl/ppb_video_capture_shared.cc +++ b/ppapi/shared_impl/ppb_video_capture_shared.cc @@ -37,7 +37,7 @@ thunk::PPB_VideoCapture_API* PPB_VideoCapture_Shared::AsPPB_VideoCapture_API() { int32_t PPB_VideoCapture_Shared::EnumerateDevices( PP_Resource* devices, - PP_CompletionCallback callback) { + const PP_CompletionCallback& callback) { if (!callback.func) return PP_ERROR_BLOCKS_MAIN_THREAD; if (TrackedCallback::IsPending(enumerate_devices_callback_)) @@ -50,7 +50,7 @@ int32_t PPB_VideoCapture_Shared::Open( const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) { + const PP_CompletionCallback& callback) { if (open_state_ != BEFORE_OPEN) return PP_ERROR_FAILED; diff --git a/ppapi/shared_impl/ppb_video_capture_shared.h b/ppapi/shared_impl/ppb_video_capture_shared.h index 5c1d96c..b5c3385 100644 --- a/ppapi/shared_impl/ppb_video_capture_shared.h +++ b/ppapi/shared_impl/ppb_video_capture_shared.h @@ -23,16 +23,17 @@ class PPAPI_SHARED_EXPORT PPB_VideoCapture_Shared explicit PPB_VideoCapture_Shared(const HostResource& host_resource); virtual ~PPB_VideoCapture_Shared(); - // Resource overrides. + // Resource implementation. virtual thunk::PPB_VideoCapture_API* AsPPB_VideoCapture_API() OVERRIDE; // PPB_VideoCapture_API implementation. - virtual int32_t EnumerateDevices(PP_Resource* devices, - PP_CompletionCallback callback) OVERRIDE; + virtual int32_t EnumerateDevices( + PP_Resource* devices, + const PP_CompletionCallback& callback) OVERRIDE; virtual int32_t Open(const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) OVERRIDE; + const PP_CompletionCallback& callback) OVERRIDE; virtual int32_t StartCapture() OVERRIDE; virtual int32_t ReuseBuffer(uint32_t buffer) OVERRIDE; virtual int32_t StopCapture() OVERRIDE; @@ -55,13 +56,14 @@ class PPAPI_SHARED_EXPORT PPB_VideoCapture_Shared // Subclasses should implement these methods to do impl- and proxy-specific // work. - virtual int32_t InternalEnumerateDevices(PP_Resource* devices, - PP_CompletionCallback callback) = 0; + virtual int32_t InternalEnumerateDevices( + PP_Resource* devices, + const PP_CompletionCallback& callback) = 0; virtual int32_t InternalOpen( const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) = 0; + const PP_CompletionCallback& callback) = 0; virtual int32_t InternalStartCapture() = 0; virtual int32_t InternalReuseBuffer(uint32_t buffer) = 0; virtual int32_t InternalStopCapture() = 0; diff --git a/ppapi/thunk/ppb_video_capture_api.h b/ppapi/thunk/ppb_video_capture_api.h index d60df0f..a792ff3 100644 --- a/ppapi/thunk/ppb_video_capture_api.h +++ b/ppapi/thunk/ppb_video_capture_api.h @@ -21,11 +21,11 @@ class PPB_VideoCapture_API { virtual ~PPB_VideoCapture_API() {} virtual int32_t EnumerateDevices(PP_Resource* devices, - PP_CompletionCallback callback) = 0; + const PP_CompletionCallback& callback) = 0; virtual int32_t Open(const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) = 0; + const PP_CompletionCallback& callback) = 0; virtual int32_t StartCapture() = 0; virtual int32_t ReuseBuffer(uint32_t buffer) = 0; virtual int32_t StopCapture() = 0; diff --git a/webkit/plugins/ppapi/ppb_video_capture_impl.cc b/webkit/plugins/ppapi/ppb_video_capture_impl.cc index cab216e..c4879bd 100644 --- a/webkit/plugins/ppapi/ppb_video_capture_impl.cc +++ b/webkit/plugins/ppapi/ppb_video_capture_impl.cc @@ -173,7 +173,7 @@ void PPB_VideoCapture_Impl::OnInitialized(media::VideoCapture* capture, int32_t PPB_VideoCapture_Impl::InternalEnumerateDevices( PP_Resource* devices, - PP_CompletionCallback callback) { + const PP_CompletionCallback& callback) { PluginInstance* instance = ResourceHelper::GetPluginInstance(this); if (!instance) return PP_ERROR_FAILED; @@ -191,7 +191,7 @@ int32_t PPB_VideoCapture_Impl::InternalOpen( const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) { + const PP_CompletionCallback& callback) { // It is able to complete synchronously if the default device is used. bool sync_completion = device_id.empty(); diff --git a/webkit/plugins/ppapi/ppb_video_capture_impl.h b/webkit/plugins/ppapi/ppb_video_capture_impl.h index bb5421b..9f61794 100644 --- a/webkit/plugins/ppapi/ppb_video_capture_impl.h +++ b/webkit/plugins/ppapi/ppb_video_capture_impl.h @@ -53,12 +53,12 @@ class PPB_VideoCapture_Impl // PPB_VideoCapture_Shared implementation. virtual int32_t InternalEnumerateDevices( PP_Resource* devices, - PP_CompletionCallback callback) OVERRIDE; + const PP_CompletionCallback& callback) OVERRIDE; virtual int32_t InternalOpen( const std::string& device_id, const PP_VideoCaptureDeviceInfo_Dev& requested_info, uint32_t buffer_count, - PP_CompletionCallback callback) OVERRIDE; + const PP_CompletionCallback& callback) OVERRIDE; virtual int32_t InternalStartCapture() OVERRIDE; virtual int32_t InternalReuseBuffer(uint32_t buffer) OVERRIDE; virtual int32_t InternalStopCapture() OVERRIDE; |