summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 02:16:08 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 02:16:08 +0000
commita76411fc3f8e18ce0332c66d9b411776cb1ade49 (patch)
tree2ea7cb1ea18259b6866e72b8e3cf034bebe6ff81 /ppapi/shared_impl
parent736e56a578416be375a9b88f5ed0e88d325b50e6 (diff)
downloadchromium_src-a76411fc3f8e18ce0332c66d9b411776cb1ade49.zip
chromium_src-a76411fc3f8e18ce0332c66d9b411776cb1ade49.tar.gz
chromium_src-a76411fc3f8e18ce0332c66d9b411776cb1ade49.tar.bz2
Coverity: Fix several pass-by-values.
CID_COUNT=6 CID=103346,103347,103348,103349,103354,103355 TEST=none BUG=none R=groby Review URL: https://chromiumcodereview.appspot.com/9595004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r--ppapi/shared_impl/ppb_video_capture_shared.cc4
-rw-r--r--ppapi/shared_impl/ppb_video_capture_shared.h16
2 files changed, 11 insertions, 9 deletions
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;