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 #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_audio_input_dev.h" |
9 #include "ppapi/c/dev/ppb_file_chooser_dev.h" | 9 #include "ppapi/c/dev/ppb_file_chooser_dev.h" |
10 #include "ppapi/c/dev/ppb_video_layer_dev.h" | 10 #include "ppapi/c/dev/ppb_video_layer_dev.h" |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" |
14 #include "ppapi/c/ppb_audio.h" | 14 #include "ppapi/c/ppb_audio.h" |
15 #include "ppapi/c/ppb_audio_config.h" | 15 #include "ppapi/c/ppb_audio_config.h" |
16 #include "ppapi/c/ppb_file_system.h" | 16 #include "ppapi/c/ppb_file_system.h" |
17 #include "ppapi/c/ppb_graphics_3d.h" | 17 #include "ppapi/c/ppb_graphics_3d.h" |
18 #include "ppapi/c/ppb_image_data.h" | 18 #include "ppapi/c/ppb_image_data.h" |
19 #include "ppapi/c/ppb_input_event.h" | 19 #include "ppapi/c/ppb_input_event.h" |
20 #include "ppapi/c/ppb_websocket.h" | 20 #include "ppapi/c/ppb_websocket.h" |
21 #include "ppapi/c/dev/pp_video_dev.h" | 21 #include "ppapi/c/dev/pp_video_dev.h" |
22 #include "ppapi/c/dev/ppb_transport_dev.h" | 22 #include "ppapi/c/dev/ppb_transport_dev.h" |
23 #include "ppapi/shared_impl/api_id.h" | 23 #include "ppapi/shared_impl/api_id.h" |
24 | 24 |
25 struct PP_Flash_Menu; | 25 struct PP_Flash_Menu; |
26 struct PP_FontDescription_Dev; | 26 struct PP_BrowserFont_Trusted_Description; |
27 struct PP_Size; | 27 struct PP_Size; |
28 | 28 |
29 namespace ppapi { | 29 namespace ppapi { |
30 | 30 |
31 struct PPB_URLRequestInfo_Data; | 31 struct PPB_URLRequestInfo_Data; |
32 | 32 |
33 namespace thunk { | 33 namespace thunk { |
34 | 34 |
35 // A functional API for creating resource types. Separating out the creation | 35 // A functional API for creating resource types. Separating out the creation |
36 // functions here allows us to implement most resources as a pure "resource | 36 // functions here allows us to implement most resources as a pure "resource |
(...skipping 12 matching lines...) Expand all Loading... |
49 virtual PP_Resource CreateAudioConfig(PP_Instance instance, | 49 virtual PP_Resource CreateAudioConfig(PP_Instance instance, |
50 PP_AudioSampleRate sample_rate, | 50 PP_AudioSampleRate sample_rate, |
51 uint32_t sample_frame_count) = 0; | 51 uint32_t sample_frame_count) = 0; |
52 virtual PP_Resource CreateAudioInput( | 52 virtual PP_Resource CreateAudioInput( |
53 PP_Instance instance, | 53 PP_Instance instance, |
54 PP_Resource config_id, | 54 PP_Resource config_id, |
55 PPB_AudioInput_Callback audio_input_callback, | 55 PPB_AudioInput_Callback audio_input_callback, |
56 void* user_data) = 0; | 56 void* user_data) = 0; |
57 virtual PP_Resource CreateAudioInputTrusted(PP_Instance instance) = 0; | 57 virtual PP_Resource CreateAudioInputTrusted(PP_Instance instance) = 0; |
58 virtual PP_Resource CreateBroker(PP_Instance instance) = 0; | 58 virtual PP_Resource CreateBroker(PP_Instance instance) = 0; |
| 59 virtual PP_Resource CreateBrowserFont( |
| 60 PP_Instance instance, |
| 61 const PP_BrowserFont_Trusted_Description* description) = 0; |
59 virtual PP_Resource CreateBuffer(PP_Instance instance, uint32_t size) = 0; | 62 virtual PP_Resource CreateBuffer(PP_Instance instance, uint32_t size) = 0; |
60 virtual PP_Resource CreateDirectoryReader(PP_Resource directory_ref) = 0; | 63 virtual PP_Resource CreateDirectoryReader(PP_Resource directory_ref) = 0; |
61 virtual PP_Resource CreateFileChooser( | 64 virtual PP_Resource CreateFileChooser( |
62 PP_Instance instance, | 65 PP_Instance instance, |
63 PP_FileChooserMode_Dev mode, | 66 PP_FileChooserMode_Dev mode, |
64 const char* accept_mime_types) = 0; | 67 const char* accept_mime_types) = 0; |
65 virtual PP_Resource CreateFileIO(PP_Instance instance) = 0; | 68 virtual PP_Resource CreateFileIO(PP_Instance instance) = 0; |
66 virtual PP_Resource CreateFileRef(PP_Resource file_system, | 69 virtual PP_Resource CreateFileRef(PP_Resource file_system, |
67 const char* path) = 0; | 70 const char* path) = 0; |
68 virtual PP_Resource CreateFileSystem(PP_Instance instance, | 71 virtual PP_Resource CreateFileSystem(PP_Instance instance, |
69 PP_FileSystemType type) = 0; | 72 PP_FileSystemType type) = 0; |
70 virtual PP_Resource CreateFlashMenu(PP_Instance instance, | 73 virtual PP_Resource CreateFlashMenu(PP_Instance instance, |
71 const PP_Flash_Menu* menu_data) = 0; | 74 const PP_Flash_Menu* menu_data) = 0; |
72 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0; | 75 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0; |
73 virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) = 0; | 76 virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) = 0; |
74 // Note: can't be called CreateFont due to Windows #defines. | |
75 virtual PP_Resource CreateFontObject( | |
76 PP_Instance instance, | |
77 const PP_FontDescription_Dev* description) = 0; | |
78 virtual PP_Resource CreateGraphics2D(PP_Instance instance, | 77 virtual PP_Resource CreateGraphics2D(PP_Instance instance, |
79 const PP_Size& size, | 78 const PP_Size& size, |
80 PP_Bool is_always_opaque) = 0; | 79 PP_Bool is_always_opaque) = 0; |
81 virtual PP_Resource CreateGraphics3D(PP_Instance instance, | 80 virtual PP_Resource CreateGraphics3D(PP_Instance instance, |
82 PP_Resource share_context, | 81 PP_Resource share_context, |
83 const int32_t* attrib_list) = 0; | 82 const int32_t* attrib_list) = 0; |
84 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance, | 83 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance, |
85 PP_Resource share_context, | 84 PP_Resource share_context, |
86 const int32_t* attrib_list) = 0; | 85 const int32_t* attrib_list) = 0; |
87 virtual PP_Resource CreateImageData(PP_Instance instance, | 86 virtual PP_Resource CreateImageData(PP_Instance instance, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 const PP_FloatPoint* wheel_ticks, | 133 const PP_FloatPoint* wheel_ticks, |
135 PP_Bool scroll_by_page) = 0; | 134 PP_Bool scroll_by_page) = 0; |
136 | 135 |
137 static const ApiID kApiID = API_ID_RESOURCE_CREATION; | 136 static const ApiID kApiID = API_ID_RESOURCE_CREATION; |
138 }; | 137 }; |
139 | 138 |
140 } // namespace thunk | 139 } // namespace thunk |
141 } // namespace ppapi | 140 } // namespace ppapi |
142 | 141 |
143 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ | 142 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ |
OLD | NEW |