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_file_chooser_dev.h" | 8 #include "ppapi/c/dev/ppb_file_chooser_dev.h" |
9 #include "ppapi/c/dev/ppb_file_system_dev.h" | 9 #include "ppapi/c/dev/ppb_file_system_dev.h" |
10 #include "ppapi/c/pp_bool.h" | 10 #include "ppapi/c/pp_bool.h" |
11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
13 #include "ppapi/c/ppb_audio.h" | 13 #include "ppapi/c/ppb_audio.h" |
14 #include "ppapi/c/ppb_audio_config.h" | 14 #include "ppapi/c/ppb_audio_config.h" |
15 #include "ppapi/c/ppb_image_data.h" | 15 #include "ppapi/c/ppb_image_data.h" |
16 #include "ppapi/proxy/interface_id.h" | 16 #include "ppapi/proxy/interface_id.h" |
17 | 17 |
18 struct PP_FontDescription_Dev; | 18 struct PP_FontDescription_Dev; |
19 struct PP_Size; | 19 struct PP_Size; |
20 | 20 |
21 namespace ppapi { | 21 namespace ppapi { |
22 namespace thunk { | 22 namespace thunk { |
23 | 23 |
24 // A functional API for creating resource types. Separating out the creation | 24 // A functional API for creating resource types. Separating out the creation |
25 // functions here allows us to implement most resources as a pure "resource | 25 // functions here allows us to implement most resources as a pure "resource |
26 // API", meaning all calls are routed on a per-resource-object basis. The | 26 // API", meaning all calls are routed on a per-resource-object basis. The |
27 // creationg functions are not per-object (since there's no object during | 27 // creation functions are not per-object (since there's no object during |
28 // creation) so need functional routing based on the instance ID. | 28 // creation) so need functional routing based on the instance ID. |
29 class ResourceCreationAPI { | 29 class ResourceCreationAPI { |
30 public: | 30 public: |
31 static const ::pp::proxy::InterfaceID interface_id = | 31 static const ::pp::proxy::InterfaceID interface_id = |
32 ::pp::proxy::INTERFACE_ID_RESOURCE_CREATION; | 32 ::pp::proxy::INTERFACE_ID_RESOURCE_CREATION; |
33 | 33 |
34 virtual PP_Resource CreateAudio(PP_Instance instance, | 34 virtual PP_Resource CreateAudio(PP_Instance instance, |
35 PP_Resource config_id, | 35 PP_Resource config_id, |
36 PPB_Audio_Callback audio_callback, | 36 PPB_Audio_Callback audio_callback, |
37 void* user_data) = 0; | 37 void* user_data) = 0; |
(...skipping 22 matching lines...) Expand all Loading... |
60 virtual PP_Resource CreateImageData(PP_Instance instance, | 60 virtual PP_Resource CreateImageData(PP_Instance instance, |
61 PP_ImageDataFormat format, | 61 PP_ImageDataFormat format, |
62 const PP_Size& size, | 62 const PP_Size& size, |
63 PP_Bool init_to_zero) = 0; | 63 PP_Bool init_to_zero) = 0; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace thunk | 66 } // namespace thunk |
67 } // namespace ppapi | 67 } // namespace ppapi |
68 | 68 |
69 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 69 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
OLD | NEW |