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

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: export AssertLockHeld Created 8 years, 6 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
« no previous file with comments | « ppapi/shared_impl/ppb_audio_config_shared.cc ('k') | ppapi/shared_impl/ppb_audio_input_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4da3940c935a3f9b2678a851ad711f67227020fc..4dfdab9361caa945d1dbd7f53feb9cb00564696e 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;
+ scoped_refptr<TrackedCallback> 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;
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
virtual PP_Resource GetCurrentConfig() OVERRIDE;
virtual PP_Bool StartCapture() OVERRIDE;
virtual PP_Bool StopCapture() OVERRIDE;
@@ -59,7 +59,8 @@ class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
size_t shared_memory_size,
base::SyncSocket::Handle socket_handle);
- static PP_CompletionCallback MakeIgnoredCompletionCallback();
+ static scoped_refptr<TrackedCallback> MakeIgnoredCompletionCallback(
+ Resource* resource);
protected:
enum OpenState {
@@ -70,12 +71,13 @@ 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;
+ virtual int32_t InternalEnumerateDevices(
+ PP_Resource* devices,
+ scoped_refptr<TrackedCallback> callback) = 0;
virtual int32_t InternalOpen(const std::string& device_id,
PP_AudioSampleRate sample_rate,
uint32_t sample_frame_count,
- PP_CompletionCallback callback) = 0;
+ scoped_refptr<TrackedCallback> callback) = 0;
virtual PP_Bool InternalStartCapture() = 0;
virtual PP_Bool InternalStopCapture() = 0;
virtual void InternalClose() = 0;
@@ -117,7 +119,7 @@ class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared
PP_Resource config,
PPB_AudioInput_Callback audio_input_callback,
void* user_data,
- PP_CompletionCallback callback);
+ scoped_refptr<TrackedCallback> callback);
OpenState open_state_;
« no previous file with comments | « ppapi/shared_impl/ppb_audio_config_shared.cc ('k') | ppapi/shared_impl/ppb_audio_input_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698