Index: webkit/plugins/ppapi/ppb_audio_impl.h |
=================================================================== |
--- webkit/plugins/ppapi/ppb_audio_impl.h (revision 0) |
+++ webkit/plugins/ppapi/ppb_audio_impl.h (working copy) |
@@ -2,9 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_AUDIO_H_ |
-#define WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_AUDIO_H_ |
+#ifndef WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ |
+#define WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ |
+#include "base/basictypes.h" |
#include "base/ref_counted.h" |
#include "base/shared_memory.h" |
#include "base/sync_socket.h" |
@@ -13,21 +14,22 @@ |
#include "ppapi/c/dev/ppb_audio_trusted_dev.h" |
#include "ppapi/c/pp_completion_callback.h" |
#include "ppapi/shared_impl/audio_impl.h" |
-#include "webkit/glue/plugins/pepper_plugin_delegate.h" |
-#include "webkit/glue/plugins/pepper_plugin_instance.h" |
-#include "webkit/glue/plugins/pepper_plugin_module.h" |
-#include "webkit/glue/plugins/pepper_resource.h" |
+#include "webkit/plugins/ppapi/plugin_delegate.h" |
+#include "webkit/plugins/ppapi/plugin_instance.h" |
+#include "webkit/plugins/ppapi/plugin_module.h" |
+#include "webkit/plugins/ppapi/resource.h" |
-namespace pepper { |
+namespace webkit { |
+namespace ppapi { |
class PluginInstance; |
class PluginModule; |
-class AudioConfig : public Resource { |
+class PPB_AudioConfig_Impl : public Resource { |
public: |
- AudioConfig(PluginModule* module, |
- PP_AudioSampleRate_Dev sample_rate, |
- uint32_t sample_frame_count); |
+ PPB_AudioConfig_Impl(PluginModule* module, |
+ PP_AudioSampleRate_Dev sample_rate, |
+ uint32_t sample_frame_count); |
size_t BufferSize(); |
static const PPB_AudioConfig_Dev* GetInterface(); |
@@ -36,7 +38,7 @@ |
private: |
// Resource override. |
- virtual AudioConfig* AsAudioConfig(); |
+ virtual PPB_AudioConfig_Impl* AsPPB_AudioConfig_Impl(); |
PP_AudioSampleRate_Dev sample_rate_; |
uint32_t sample_frame_count_; |
@@ -44,12 +46,12 @@ |
// Some of the backend functionality of this class is implemented by the |
// AudioImpl so it can be shared with the proxy. |
-class Audio : public Resource, |
- public pp::shared_impl::AudioImpl, |
- public PluginDelegate::PlatformAudio::Client { |
+class PPB_Audio_Impl : public Resource, |
+ public pp::shared_impl::AudioImpl, |
+ public PluginDelegate::PlatformAudio::Client { |
public: |
- explicit Audio(PluginModule* module, PP_Instance instance_id); |
- virtual ~Audio(); |
+ explicit PPB_Audio_Impl(PluginModule* module, PP_Instance instance_id); |
+ virtual ~PPB_Audio_Impl(); |
static const PPB_Audio_Dev* GetInterface(); |
static const PPB_AudioTrusted_Dev* GetTrustedInterface(); |
@@ -74,16 +76,16 @@ |
int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size); |
// Resource override. |
- virtual Audio* AsAudio(); |
+ virtual PPB_Audio_Impl* AsPPB_Audio_Impl(); |
private: |
- // pepper::PluginDelegate::PlatformAudio::Client implementation. |
+ // PluginDelegate::PlatformAudio::Client implementation. |
virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, |
size_t shared_memory_size_, |
base::SyncSocket::Handle socket); |
// AudioConfig used for creating this Audio object. |
- scoped_refptr<AudioConfig> config_; |
+ scoped_refptr<PPB_AudioConfig_Impl> config_; |
// Plugin instance that owns this audio object. |
PP_Instance pp_instance_; |
@@ -104,8 +106,11 @@ |
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(PPB_Audio_Impl); |
}; |
-} // namespace pepper |
+} // namespace ppapi |
+} // namespace webkit |
-#endif // WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_AUDIO_H_ |
+#endif // WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ |