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