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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |