| 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 #ifndef PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 5 #ifndef PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
| 6 #define PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 6 #define PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/ppb_audio_input_dev.h" |
| 8 #include "ppapi/c/dev/ppb_file_chooser_dev.h" | 9 #include "ppapi/c/dev/ppb_file_chooser_dev.h" |
| 9 #include "ppapi/c/dev/ppb_video_layer_dev.h" | 10 #include "ppapi/c/dev/ppb_video_layer_dev.h" |
| 10 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 11 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" |
| 13 #include "ppapi/c/ppb_audio.h" | 14 #include "ppapi/c/ppb_audio.h" |
| 14 #include "ppapi/c/ppb_audio_config.h" | 15 #include "ppapi/c/ppb_audio_config.h" |
| 15 #include "ppapi/c/ppb_file_system.h" | 16 #include "ppapi/c/ppb_file_system.h" |
| 16 #include "ppapi/c/ppb_graphics_3d.h" | 17 #include "ppapi/c/ppb_graphics_3d.h" |
| 17 #include "ppapi/c/ppb_image_data.h" | 18 #include "ppapi/c/ppb_image_data.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 36 // creation functions are not per-object (since there's no object during | 37 // creation functions are not per-object (since there's no object during |
| 37 // creation) so need functional routing based on the instance ID. | 38 // creation) so need functional routing based on the instance ID. |
| 38 class ResourceCreationAPI { | 39 class ResourceCreationAPI { |
| 39 public: | 40 public: |
| 40 virtual ~ResourceCreationAPI() {} | 41 virtual ~ResourceCreationAPI() {} |
| 41 | 42 |
| 42 virtual PP_Resource CreateAudio(PP_Instance instance, | 43 virtual PP_Resource CreateAudio(PP_Instance instance, |
| 43 PP_Resource config_id, | 44 PP_Resource config_id, |
| 44 PPB_Audio_Callback audio_callback, | 45 PPB_Audio_Callback audio_callback, |
| 45 void* user_data) = 0; | 46 void* user_data) = 0; |
| 46 virtual PP_Resource CreateAudioTrusted(PP_Instance instace) = 0; | 47 virtual PP_Resource CreateAudioTrusted(PP_Instance instance) = 0; |
| 47 virtual PP_Resource CreateAudioConfig(PP_Instance instance, | 48 virtual PP_Resource CreateAudioConfig(PP_Instance instance, |
| 48 PP_AudioSampleRate sample_rate, | 49 PP_AudioSampleRate sample_rate, |
| 49 uint32_t sample_frame_count) = 0; | 50 uint32_t sample_frame_count) = 0; |
| 51 virtual PP_Resource CreateAudioInput( |
| 52 PP_Instance instance, |
| 53 PP_Resource config_id, |
| 54 PPB_AudioInput_Callback audio_input_callback, |
| 55 void* user_data) = 0; |
| 56 virtual PP_Resource CreateAudioInputTrusted(PP_Instance instance) = 0; |
| 50 virtual PP_Resource CreateBroker(PP_Instance instance) = 0; | 57 virtual PP_Resource CreateBroker(PP_Instance instance) = 0; |
| 51 virtual PP_Resource CreateBuffer(PP_Instance instance, uint32_t size) = 0; | 58 virtual PP_Resource CreateBuffer(PP_Instance instance, uint32_t size) = 0; |
| 52 virtual PP_Resource CreateContext3D(PP_Instance instance, | 59 virtual PP_Resource CreateContext3D(PP_Instance instance, |
| 53 PP_Config3D_Dev config, | 60 PP_Config3D_Dev config, |
| 54 PP_Resource share_context, | 61 PP_Resource share_context, |
| 55 const int32_t* attrib_list) = 0; | 62 const int32_t* attrib_list) = 0; |
| 56 virtual PP_Resource CreateContext3DRaw(PP_Instance instance, | 63 virtual PP_Resource CreateContext3DRaw(PP_Instance instance, |
| 57 PP_Config3D_Dev config, | 64 PP_Config3D_Dev config, |
| 58 PP_Resource share_context, | 65 PP_Resource share_context, |
| 59 const int32_t* attrib_list) = 0; | 66 const int32_t* attrib_list) = 0; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 const PP_FloatPoint* wheel_ticks, | 139 const PP_FloatPoint* wheel_ticks, |
| 133 PP_Bool scroll_by_page) = 0; | 140 PP_Bool scroll_by_page) = 0; |
| 134 | 141 |
| 135 static const ApiID kApiID = API_ID_RESOURCE_CREATION; | 142 static const ApiID kApiID = API_ID_RESOURCE_CREATION; |
| 136 }; | 143 }; |
| 137 | 144 |
| 138 } // namespace thunk | 145 } // namespace thunk |
| 139 } // namespace ppapi | 146 } // namespace ppapi |
| 140 | 147 |
| 141 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 148 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
| OLD | NEW |