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

Unified Diff: webkit/plugins/ppapi/plugin_delegate.h

Issue 8561003: Revert 110602 - Revert 110587 - Microphone support for Pepper Flash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_delegate.h
===================================================================
--- webkit/plugins/ppapi/plugin_delegate.h (revision 110608)
+++ webkit/plugins/ppapi/plugin_delegate.h (working copy)
@@ -180,19 +180,21 @@
virtual bool Echo(const base::Callback<void()>& callback) = 0;
};
+ // The (interface for the) client used by |PlatformAudio| and
+ // |PlatformAudioInput|.
+ class PlatformAudioCommonClient {
+ protected:
+ virtual ~PlatformAudioCommonClient() {}
+
+ public:
+ // Called when the stream is created.
+ virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle,
+ size_t shared_memory_size,
+ base::SyncSocket::Handle socket) = 0;
+ };
+
class PlatformAudio {
public:
- class Client {
- protected:
- virtual ~Client() {}
-
- public:
- // Called when the stream is created.
- virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle,
- size_t shared_memory_size,
- base::SyncSocket::Handle socket) = 0;
- };
-
// Starts the playback. Returns false on error or if called before the
// stream is created or after the stream is closed.
virtual bool StartPlayback() = 0;
@@ -209,6 +211,24 @@
virtual ~PlatformAudio() {}
};
+ class PlatformAudioInput {
+ public:
+ // Starts the playback. Returns false on error or if called before the
+ // stream is created or after the stream is closed.
+ virtual bool 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;
+
+ // Closes the stream. Make sure to call this before the object is
+ // destructed.
+ virtual void ShutDown() = 0;
+
+ protected:
+ virtual ~PlatformAudioInput() {}
+ };
+
// Interface for PlatformVideoDecoder is directly inherited from general media
// VideoDecodeAccelerator interface.
class PlatformVideoDecoder : public media::VideoDecodeAccelerator {
@@ -285,8 +305,14 @@
// to clean up the corresponding resources allocated during this call.
virtual PlatformAudio* CreateAudio(uint32_t sample_rate,
uint32_t sample_count,
- PlatformAudio::Client* client) = 0;
+ PlatformAudioCommonClient* client) = 0;
+ // The caller is responsible for calling Shutdown() on the returned pointer
+ // to clean up the corresponding resources allocated during this call.
+ virtual PlatformAudioInput* CreateAudioInput(uint32_t sample_rate,
+ uint32_t sample_count,
+ PlatformAudioCommonClient* client) = 0;
+
// A pointer is returned immediately, but it is not ready to be used until
// BrokerConnected has been called.
// The caller is responsible for calling Release() on the returned pointer
Property changes on: webkit/plugins/ppapi/plugin_delegate.h
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/src/webkit/plugins/ppapi/plugin_delegate.h:r3734-4217,4606-5108,5177-5263
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698