OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/plugins/ppapi/ppb_audio_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_audio_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
9 #include "ppapi/c/ppb_audio.h" | 9 #include "ppapi/c/ppb_audio.h" |
10 #include "ppapi/c/ppb_audio_config.h" | 10 #include "ppapi/c/ppb_audio_config.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 using ppapi::thunk::PPB_Audio_API; | 21 using ppapi::thunk::PPB_Audio_API; |
22 using ppapi::thunk::PPB_AudioConfig_API; | 22 using ppapi::thunk::PPB_AudioConfig_API; |
23 using ppapi::TrackedCallback; | 23 using ppapi::TrackedCallback; |
24 | 24 |
25 namespace webkit { | 25 namespace webkit { |
26 namespace ppapi { | 26 namespace ppapi { |
27 | 27 |
28 // PPB_Audio_Impl -------------------------------------------------------------- | 28 // PPB_Audio_Impl -------------------------------------------------------------- |
29 | 29 |
30 PPB_Audio_Impl::PPB_Audio_Impl(PP_Instance instance) | 30 PPB_Audio_Impl::PPB_Audio_Impl(PP_Instance instance) |
31 : Resource(instance), | 31 : Resource(::ppapi::OBJECT_IS_IMPL, instance), |
32 audio_(NULL) { | 32 audio_(NULL) { |
33 } | 33 } |
34 | 34 |
35 PPB_Audio_Impl::~PPB_Audio_Impl() { | 35 PPB_Audio_Impl::~PPB_Audio_Impl() { |
36 // Calling ShutDown() makes sure StreamCreated cannot be called anymore and | 36 // Calling ShutDown() makes sure StreamCreated cannot be called anymore and |
37 // releases the audio data associated with the pointer. Note however, that | 37 // releases the audio data associated with the pointer. Note however, that |
38 // until ShutDown returns, StreamCreated may still be called. This will be | 38 // until ShutDown returns, StreamCreated may still be called. This will be |
39 // OK since we'll just immediately clean up the data it stored later in this | 39 // OK since we'll just immediately clean up the data it stored later in this |
40 // destructor. | 40 // destructor. |
41 if (audio_) { | 41 if (audio_) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 void PPB_Audio_Impl::OnSetStreamInfo( | 149 void PPB_Audio_Impl::OnSetStreamInfo( |
150 base::SharedMemoryHandle shared_memory_handle, | 150 base::SharedMemoryHandle shared_memory_handle, |
151 size_t shared_memory_size, | 151 size_t shared_memory_size, |
152 base::SyncSocket::Handle socket_handle) { | 152 base::SyncSocket::Handle socket_handle) { |
153 SetStreamInfo(shared_memory_handle, shared_memory_size, socket_handle); | 153 SetStreamInfo(shared_memory_handle, shared_memory_size, socket_handle); |
154 } | 154 } |
155 | 155 |
156 } // namespace ppapi | 156 } // namespace ppapi |
157 } // namespace webkit | 157 } // namespace webkit |
OLD | NEW |