Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: ppapi/proxy/ppb_audio_proxy.cc

Issue 10168026: Delete FunctionGroupBase from Pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/plugin_globals.cc ('k') | ppapi/proxy/ppb_file_ref_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/ppb_audio.h" 10 #include "ppapi/c/ppb_audio.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 OnMsgNotifyAudioStreamCreated) 164 OnMsgNotifyAudioStreamCreated)
165 IPC_MESSAGE_UNHANDLED(handled = false) 165 IPC_MESSAGE_UNHANDLED(handled = false)
166 IPC_END_MESSAGE_MAP() 166 IPC_END_MESSAGE_MAP()
167 return handled; 167 return handled;
168 } 168 }
169 169
170 void PPB_Audio_Proxy::OnMsgCreate(PP_Instance instance_id, 170 void PPB_Audio_Proxy::OnMsgCreate(PP_Instance instance_id,
171 int32_t sample_rate, 171 int32_t sample_rate,
172 uint32_t sample_frame_count, 172 uint32_t sample_frame_count,
173 HostResource* result) { 173 HostResource* result) {
174 thunk::EnterFunction<thunk::ResourceCreationAPI> resource_creation( 174 thunk::EnterResourceCreation resource_creation(instance_id);
175 instance_id, true);
176 if (resource_creation.failed()) 175 if (resource_creation.failed())
177 return; 176 return;
178 177
179 // Make the resource and get the API pointer to its trusted interface. 178 // Make the resource and get the API pointer to its trusted interface.
180 result->SetHostResource( 179 result->SetHostResource(
181 instance_id, 180 instance_id,
182 resource_creation.functions()->CreateAudioTrusted(instance_id)); 181 resource_creation.functions()->CreateAudioTrusted(instance_id));
183 if (result->is_null()) 182 if (result->is_null())
184 return; 183 return;
185 184
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 *foreign_shared_memory_handle = dispatcher()->ShareHandleWithRemote( 308 *foreign_shared_memory_handle = dispatcher()->ShareHandleWithRemote(
310 IntToPlatformFile(shared_memory_handle), false); 309 IntToPlatformFile(shared_memory_handle), false);
311 if (*foreign_shared_memory_handle == IPC::InvalidPlatformFileForTransit()) 310 if (*foreign_shared_memory_handle == IPC::InvalidPlatformFileForTransit())
312 return PP_ERROR_FAILED; 311 return PP_ERROR_FAILED;
313 312
314 return PP_OK; 313 return PP_OK;
315 } 314 }
316 315
317 } // namespace proxy 316 } // namespace proxy
318 } // namespace ppapi 317 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_globals.cc ('k') | ppapi/proxy/ppb_file_ref_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698