| 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_input_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ppapi/c/dev/ppb_audio_input_dev.h" | 8 #include "ppapi/c/dev/ppb_audio_input_dev.h" |
| 9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
| 10 #include "ppapi/c/ppb_audio_config.h" | 10 #include "ppapi/c/ppb_audio_config.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 audio_input_ = NULL; | 42 audio_input_ = NULL; |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 // static | 46 // static |
| 47 PP_Resource PPB_AudioInput_Impl::Create(PP_Instance instance, | 47 PP_Resource PPB_AudioInput_Impl::Create(PP_Instance instance, |
| 48 PP_Resource config, | 48 PP_Resource config, |
| 49 PPB_AudioInput_Callback audio_input_callback, | 49 PPB_AudioInput_Callback audio_input_callback, |
| 50 void* user_data) { | 50 void* user_data) { |
| 51 scoped_refptr<PPB_AudioInput_Impl> | 51 scoped_refptr<PPB_AudioInput_Impl> |
| 52 audio_input(new PPB_AudioInput_Impl(instance)); | 52 audio_input(new PPB_AudioInput_Impl(instance)); |
| 53 if (!audio_input->Init(config, audio_input_callback, user_data)) | 53 if (!audio_input->Init(config, audio_input_callback, user_data)) |
| 54 return 0; | 54 return 0; |
| 55 return audio_input->GetReference(); | 55 return audio_input->GetReference(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 PPB_AudioInput_API* PPB_AudioInput_Impl::AsPPB_AudioInput_API() { | 58 PPB_AudioInput_API* PPB_AudioInput_Impl::AsPPB_AudioInput_API() { |
| 59 return this; | 59 return this; |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool PPB_AudioInput_Impl::Init(PP_Resource config, | 62 bool PPB_AudioInput_Impl::Init(PP_Resource config, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 void PPB_AudioInput_Impl::OnSetStreamInfo( | 152 void PPB_AudioInput_Impl::OnSetStreamInfo( |
| 153 base::SharedMemoryHandle shared_memory_handle, | 153 base::SharedMemoryHandle shared_memory_handle, |
| 154 size_t shared_memory_size, | 154 size_t shared_memory_size, |
| 155 base::SyncSocket::Handle socket_handle) { | 155 base::SyncSocket::Handle socket_handle) { |
| 156 SetStreamInfo(shared_memory_handle, shared_memory_size, socket_handle); | 156 SetStreamInfo(shared_memory_handle, shared_memory_size, socket_handle); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace ppapi | 159 } // namespace ppapi |
| 160 } // namespace webkit | 160 } // namespace webkit |
| OLD | NEW |