Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: ppapi/shared_impl/ppb_audio_input_shared.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up for review. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/shared_impl/ppb_audio_input_shared.h
diff --git a/ppapi/shared_impl/ppb_audio_input_shared.h b/ppapi/shared_impl/ppb_audio_input_shared.h
index a35461438603346f24783c77f8becab5679d863f..e30ff5d90d25a75bc2f9f768b9af3e4c7334c580 100644
--- a/ppapi/shared_impl/ppb_audio_input_shared.h
+++ b/ppapi/shared_impl/ppb_audio_input_shared.h
@@ -41,12 +41,12 @@ class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
// Implementation of PPB_AudioInput_API non-trusted methods.
virtual int32_t EnumerateDevices(
PP_Resource* devices,
- const PP_CompletionCallback& callback) OVERRIDE;
+ ApiCallbackType callback) OVERRIDE;
virtual int32_t Open(const std::string& device_id,
PP_Resource config,
PPB_AudioInput_Callback audio_input_callback,
void* user_data,
- const PP_CompletionCallback& callback) OVERRIDE;
+ ApiCallbackType callback) OVERRIDE;
virtual PP_Resource GetCurrentConfig() OVERRIDE;
virtual PP_Bool StartCapture() OVERRIDE;
virtual PP_Bool StopCapture() OVERRIDE;
@@ -59,7 +59,7 @@ class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
size_t shared_memory_size,
base::SyncSocket::Handle socket_handle);
- static PP_CompletionCallback MakeIgnoredCompletionCallback();
+ static ApiCallbackType MakeIgnoredCompletionCallback(Resource* resource);
protected:
enum OpenState {
@@ -71,11 +71,11 @@ class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
// Subclasses should implement these methods to do impl- and proxy-specific
// work.
virtual int32_t InternalEnumerateDevices(PP_Resource* devices,
- PP_CompletionCallback callback) = 0;
+ ApiCallbackType callback) = 0;
virtual int32_t InternalOpen(const std::string& device_id,
PP_AudioSampleRate sample_rate,
uint32_t sample_frame_count,
- PP_CompletionCallback callback) = 0;
+ ApiCallbackType callback) = 0;
virtual PP_Bool InternalStartCapture() = 0;
virtual PP_Bool InternalStopCapture() = 0;
virtual void InternalClose() = 0;
@@ -114,7 +114,7 @@ class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
PP_Resource config,
PPB_AudioInput_Callback audio_input_callback,
void* user_data,
- PP_CompletionCallback callback);
+ ApiCallbackType callback);
OpenState open_state_;

Powered by Google App Engine
This is Rietveld 408576698