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

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

Issue 10412014: Get PPB_Audio interface building as untrusted code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/resource_creation_proxy.h ('k') | ppapi/thunk/resource_creation_api.h » ('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/resource_creation_proxy.h" 5 #include "ppapi/proxy/resource_creation_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_size.h" 8 #include "ppapi/c/pp_size.h"
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 data.event_time_stamp = time_stamp; 165 data.event_time_stamp = time_stamp;
166 data.event_modifiers = modifiers; 166 data.event_modifiers = modifiers;
167 data.wheel_delta = *wheel_delta; 167 data.wheel_delta = *wheel_delta;
168 data.wheel_ticks = *wheel_ticks; 168 data.wheel_ticks = *wheel_ticks;
169 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); 169 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page);
170 170
171 return (new PPB_InputEvent_Shared(OBJECT_IS_PROXY, 171 return (new PPB_InputEvent_Shared(OBJECT_IS_PROXY,
172 instance, data))->GetReference(); 172 instance, data))->GetReference();
173 } 173 }
174 174
175 #if !defined(OS_NACL)
176 PP_Resource ResourceCreationProxy::CreateAudio( 175 PP_Resource ResourceCreationProxy::CreateAudio(
177 PP_Instance instance, 176 PP_Instance instance,
178 PP_Resource config_id, 177 PP_Resource config_id,
179 PPB_Audio_Callback audio_callback, 178 PPB_Audio_Callback audio_callback,
180 void* user_data) { 179 void* user_data) {
181 return PPB_Audio_Proxy::CreateProxyResource(instance, config_id, 180 return PPB_Audio_Proxy::CreateProxyResource(instance, config_id,
182 audio_callback, user_data); 181 audio_callback, user_data);
183 } 182 }
184 183
185 PP_Resource ResourceCreationProxy::CreateAudioConfig( 184 PP_Resource ResourceCreationProxy::CreateAudioConfig(
186 PP_Instance instance, 185 PP_Instance instance,
187 PP_AudioSampleRate sample_rate, 186 PP_AudioSampleRate sample_rate,
188 uint32_t sample_frame_count) { 187 uint32_t sample_frame_count) {
189 return PPB_AudioConfig_Shared::Create( 188 return PPB_AudioConfig_Shared::Create(
190 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count); 189 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count);
191 } 190 }
192 191
192 #if !defined(OS_NACL)
193 PP_Resource ResourceCreationProxy::CreateAudioTrusted(PP_Instance instance) { 193 PP_Resource ResourceCreationProxy::CreateAudioTrusted(PP_Instance instance) {
194 // Proxied plugins can't created trusted audio devices. 194 // Proxied plugins can't create trusted audio devices.
195 return 0; 195 return 0;
196 } 196 }
197 197
198 PP_Resource ResourceCreationProxy::CreateAudioInput0_1( 198 PP_Resource ResourceCreationProxy::CreateAudioInput0_1(
199 PP_Instance instance, 199 PP_Instance instance,
200 PP_Resource config_id, 200 PP_Resource config_id,
201 PPB_AudioInput_Callback audio_input_callback, 201 PPB_AudioInput_Callback audio_input_callback,
202 void* user_data) { 202 void* user_data) {
203 return PPB_AudioInput_Proxy::CreateProxyResource0_1(instance, config_id, 203 return PPB_AudioInput_Proxy::CreateProxyResource0_1(instance, config_id,
204 audio_input_callback, 204 audio_input_callback,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 bool ResourceCreationProxy::Send(IPC::Message* msg) { 365 bool ResourceCreationProxy::Send(IPC::Message* msg) {
366 return dispatcher()->Send(msg); 366 return dispatcher()->Send(msg);
367 } 367 }
368 368
369 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 369 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
370 return false; 370 return false;
371 } 371 }
372 372
373 } // namespace proxy 373 } // namespace proxy
374 } // namespace ppapi 374 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/thunk/resource_creation_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698