Index: webkit/plugins/ppapi/audio_helper.h |
=================================================================== |
--- webkit/plugins/ppapi/audio_helper.h (revision 0) |
+++ webkit/plugins/ppapi/audio_helper.h (revision 0) |
@@ -0,0 +1,62 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef WEBKIT_PLUGINS_PPAPI_AUDIO_HELPER_H_ |
+#define WEBKIT_PLUGINS_PPAPI_AUDIO_HELPER_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/shared_memory.h" |
+#include "base/sync_socket.h" |
+#include "ppapi/c/pp_completion_callback.h" |
+#include "ppapi/shared_impl/scoped_pp_resource.h" |
+#include "ppapi/shared_impl/resource.h" |
+#include "webkit/plugins/ppapi/plugin_delegate.h" |
+#include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
+ |
+namespace webkit { |
+namespace ppapi { |
+ |
+class AudioHelper { |
+ public: |
+ explicit AudioHelper(); |
viettrungluu
2011/11/08 00:41:54
No |explicit|.
|
+ |
+ virtual ~AudioHelper(); |
+ |
+ virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE; |
viettrungluu
2011/11/08 00:41:54
No OVERRIDEs.
|
+ virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE; |
+ |
+ virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle, |
+ size_t shared_memory_size, |
+ base::SyncSocket::Handle socket_handle) = 0; |
+ |
+ void StreamCreated_(base::SharedMemoryHandle shared_memory_handle, |
+ size_t shared_memory_size_, |
+ base::SyncSocket::Handle socket); |
+ |
+ void SetCallbackInfo(bool create_callback_pending, |
+ PP_CompletionCallback create_callback); |
+ |
+private: |
viettrungluu
2011/11/08 00:41:54
indentation
|
+ // Is a create callback pending to fire? |
+ bool create_callback_pending_; |
+ |
+ // Trusted callback invoked from StreamCreated. |
+ PP_CompletionCallback create_callback_; |
+ |
+ // When a create callback is being issued, these will save the info for |
+ // querying from the callback. The proxy uses this to get the handles to the |
+ // other process instead of mapping them in the renderer. These will be |
+ // invalid all other times. |
+ scoped_ptr<base::SharedMemory> shared_memory_for_create_callback_; |
+ size_t shared_memory_size_for_create_callback_; |
+ scoped_ptr<base::SyncSocket> socket_for_create_callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AudioHelper); |
+}; |
+ |
+} // namespace ppapi |
+} // namespace webkit |
+ |
+#endif // WEBKIT_PLUGINS_PPAPI_AUDIO_HELPER_H_ |
Property changes on: webkit/plugins/ppapi/audio_helper.h |
___________________________________________________________________ |
Added: svn:executable |
+ * |