Chromium Code Reviews| Index: webkit/plugins/ppapi/plugin_delegate.h |
| diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h |
| index be8cd1635115d4ca2eec7df6c7f36d91c31df58e..1189739d9c96762efe16a953d10d45d4201530a8 100644 |
| --- a/webkit/plugins/ppapi/plugin_delegate.h |
| +++ b/webkit/plugins/ppapi/plugin_delegate.h |
| @@ -196,11 +196,11 @@ class PluginDelegate { |
| virtual bool Echo(const base::Callback<void()>& callback) = 0; |
| }; |
| - // The (interface for the) client used by |PlatformAudio| and |
| + // The base class of clients used by |PlatformAudioOutput| and |
| // |PlatformAudioInput|. |
| - class PlatformAudioCommonClient { |
| + class PlatformAudioClientBase { |
| protected: |
| - virtual ~PlatformAudioCommonClient() {} |
| + virtual ~PlatformAudioClientBase() {} |
| public: |
| // Called when the stream is created. |
| @@ -209,6 +209,11 @@ class PluginDelegate { |
| base::SyncSocket::Handle socket) = 0; |
| }; |
| + class PlatformAudioOutputClient : public PlatformAudioClientBase { |
| + protected: |
| + virtual ~PlatformAudioOutputClient() {} |
| + }; |
| + |
| class PlatformAudioOutput { |
| public: |
| // Starts the playback. Returns false on error or if called before the |
| @@ -227,15 +232,21 @@ class PluginDelegate { |
| virtual ~PlatformAudioOutput() {} |
| }; |
| + class PlatformAudioInputClient : public PlatformAudioClientBase { |
| + public: |
| + virtual void StreamCreationFailed() = 0; |
| + |
| + protected: |
| + virtual ~PlatformAudioInputClient() {} |
| + }; |
| + |
| class PlatformAudioInput { |
| public: |
| - // Starts the capture. Returns false on error or if called before the |
| - // stream is created or after the stream is closed. |
| - virtual bool StartCapture() = 0; |
| + // Starts the capture. |
|
viettrungluu
2012/03/20 18:20:02
Nit: I think this comment is now officially useles
yzshen1
2012/03/21 17:55:46
Done.
|
| + virtual void StartCapture() = 0; |
| - // Stops the capture. Returns false on error or if called before the stream |
| - // is created or after the stream is closed. |
| - virtual bool StopCapture() = 0; |
| + // Stops the capture. |
|
viettrungluu
2012/03/20 18:20:02
"
yzshen1
2012/03/21 17:55:46
Done.
|
| + virtual void StopCapture() = 0; |
| // Closes the stream. Make sure to call this before the object is |
| // destructed. |
| @@ -346,14 +357,16 @@ class PluginDelegate { |
| virtual PlatformAudioOutput* CreateAudioOutput( |
| uint32_t sample_rate, |
| uint32_t sample_count, |
| - PlatformAudioCommonClient* client) = 0; |
| + PlatformAudioOutputClient* client) = 0; |
| + // If |device_id| is empty, the default audio input device will be used. |
| // The caller is responsible for calling Shutdown() on the returned pointer |
| // to clean up the corresponding resources allocated during this call. |
| virtual PlatformAudioInput* CreateAudioInput( |
| + const std::string& device_id, |
| uint32_t sample_rate, |
| uint32_t sample_count, |
| - PlatformAudioCommonClient* client) = 0; |
| + PlatformAudioInputClient* client) = 0; |
| // A pointer is returned immediately, but it is not ready to be used until |
| // BrokerConnected has been called. |