OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/proxy/ppb_audio_proxy.h" | 5 #include "ppapi/proxy/ppb_audio_proxy.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/threading/simple_thread.h" | 8 #include "base/threading/simple_thread.h" |
9 #include "media/audio/shared_memory_util.h" | 9 #include "media/audio/shared_memory_util.h" |
10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 int32_t Audio::GetSyncSocket(int* sync_socket) { | 122 int32_t Audio::GetSyncSocket(int* sync_socket) { |
123 return PP_ERROR_NOTSUPPORTED; // Don't proxy the trusted interface. | 123 return PP_ERROR_NOTSUPPORTED; // Don't proxy the trusted interface. |
124 } | 124 } |
125 | 125 |
126 int32_t Audio::GetSharedMemory(int* shm_handle, uint32_t* shm_size) { | 126 int32_t Audio::GetSharedMemory(int* shm_handle, uint32_t* shm_size) { |
127 return PP_ERROR_NOTSUPPORTED; // Don't proxy the trusted interface. | 127 return PP_ERROR_NOTSUPPORTED; // Don't proxy the trusted interface. |
128 } | 128 } |
129 | 129 |
130 PPB_Audio_Proxy::PPB_Audio_Proxy(Dispatcher* dispatcher) | 130 PPB_Audio_Proxy::PPB_Audio_Proxy(Dispatcher* dispatcher) |
131 : InterfaceProxy(dispatcher), | 131 : InterfaceProxy(dispatcher), |
132 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 132 callback_factory_(this) { |
133 } | 133 } |
134 | 134 |
135 PPB_Audio_Proxy::~PPB_Audio_Proxy() { | 135 PPB_Audio_Proxy::~PPB_Audio_Proxy() { |
136 } | 136 } |
137 | 137 |
138 // static | 138 // static |
139 PP_Resource PPB_Audio_Proxy::CreateProxyResource( | 139 PP_Resource PPB_Audio_Proxy::CreateProxyResource( |
140 PP_Instance instance_id, | 140 PP_Instance instance_id, |
141 PP_Resource config_id, | 141 PP_Resource config_id, |
142 PPB_Audio_Callback audio_callback, | 142 PPB_Audio_Callback audio_callback, |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 static_cast<Audio*>(enter.object())->SetStreamInfo( | 341 static_cast<Audio*>(enter.object())->SetStreamInfo( |
342 enter.resource()->pp_instance(), handle.shmem(), | 342 enter.resource()->pp_instance(), handle.shmem(), |
343 media::PacketSizeInBytes(handle.size()), | 343 media::PacketSizeInBytes(handle.size()), |
344 IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor()), | 344 IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor()), |
345 config.object()->GetSampleFrameCount()); | 345 config.object()->GetSampleFrameCount()); |
346 } | 346 } |
347 } | 347 } |
348 | 348 |
349 } // namespace proxy | 349 } // namespace proxy |
350 } // namespace ppapi | 350 } // namespace ppapi |
OLD | NEW |