Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: ppapi/thunk/resource_creation_api.h

Issue 7227003: Add virtual destructors for the Pepper API thunks. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/thunk/ppb_widget_api.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/dev/ppb_graphics_3d_dev.h" 10 #include "ppapi/c/dev/ppb_graphics_3d_dev.h"
(...skipping 13 matching lines...) Expand all
24 namespace ppapi { 24 namespace ppapi {
25 namespace thunk { 25 namespace thunk {
26 26
27 // A functional API for creating resource types. Separating out the creation 27 // A functional API for creating resource types. Separating out the creation
28 // functions here allows us to implement most resources as a pure "resource 28 // functions here allows us to implement most resources as a pure "resource
29 // API", meaning all calls are routed on a per-resource-object basis. The 29 // API", meaning all calls are routed on a per-resource-object basis. The
30 // creation functions are not per-object (since there's no object during 30 // creation functions are not per-object (since there's no object during
31 // creation) so need functional routing based on the instance ID. 31 // creation) so need functional routing based on the instance ID.
32 class ResourceCreationAPI { 32 class ResourceCreationAPI {
33 public: 33 public:
34 static const ::pp::proxy::InterfaceID interface_id = 34 virtual ~ResourceCreationAPI() {}
35 ::pp::proxy::INTERFACE_ID_RESOURCE_CREATION;
36 35
37 virtual PP_Resource CreateAudio(PP_Instance instance, 36 virtual PP_Resource CreateAudio(PP_Instance instance,
38 PP_Resource config_id, 37 PP_Resource config_id,
39 PPB_Audio_Callback audio_callback, 38 PPB_Audio_Callback audio_callback,
40 void* user_data) = 0; 39 void* user_data) = 0;
41 virtual PP_Resource CreateAudioTrusted(PP_Instance instace) = 0; 40 virtual PP_Resource CreateAudioTrusted(PP_Instance instace) = 0;
42 virtual PP_Resource CreateAudioConfig(PP_Instance instance, 41 virtual PP_Resource CreateAudioConfig(PP_Instance instance,
43 PP_AudioSampleRate sample_rate, 42 PP_AudioSampleRate sample_rate,
44 uint32_t sample_frame_count) = 0; 43 uint32_t sample_frame_count) = 0;
45 virtual PP_Resource CreateBroker(PP_Instance instance) = 0; 44 virtual PP_Resource CreateBroker(PP_Instance instance) = 0;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 PP_Config3D_Dev config, 84 PP_Config3D_Dev config,
86 const int32_t* attrib_list) = 0; 85 const int32_t* attrib_list) = 0;
87 virtual PP_Resource CreateTransport(PP_Instance instance, 86 virtual PP_Resource CreateTransport(PP_Instance instance,
88 const char* name, 87 const char* name,
89 const char* proto) = 0; 88 const char* proto) = 0;
90 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0; 89 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0;
91 virtual PP_Resource CreateURLRequestInfo(PP_Instance instance) = 0; 90 virtual PP_Resource CreateURLRequestInfo(PP_Instance instance) = 0;
92 virtual PP_Resource CreateVideoDecoder(PP_Instance instance) = 0; 91 virtual PP_Resource CreateVideoDecoder(PP_Instance instance) = 0;
93 virtual PP_Resource CreateVideoLayer(PP_Instance instance, 92 virtual PP_Resource CreateVideoLayer(PP_Instance instance,
94 PP_VideoLayerMode_Dev mode) = 0; 93 PP_VideoLayerMode_Dev mode) = 0;
94
95 static const ::pp::proxy::InterfaceID interface_id =
96 ::pp::proxy::INTERFACE_ID_RESOURCE_CREATION;
95 }; 97 };
96 98
97 } // namespace thunk 99 } // namespace thunk
98 } // namespace ppapi 100 } // namespace ppapi
99 101
100 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ 102 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_widget_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698