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

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

Issue 10386145: Add the necessary plumbing mechanisms to ensure proper WebGL support inside the <browser> tag, whic… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nits picked Created 8 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
OLDNEW
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"
(...skipping 15 matching lines...) Expand all
26 struct PP_Flash_Menu; 26 struct PP_Flash_Menu;
27 struct PP_BrowserFont_Trusted_Description; 27 struct PP_BrowserFont_Trusted_Description;
28 struct PP_Size; 28 struct PP_Size;
29 29
30 namespace ppapi { 30 namespace ppapi {
31 31
32 struct PPB_URLRequestInfo_Data; 32 struct PPB_URLRequestInfo_Data;
33 33
34 namespace thunk { 34 namespace thunk {
35 35
36 class PPB_Graphics3D_API;
37
36 // A functional API for creating resource types. Separating out the creation 38 // A functional API for creating resource types. Separating out the creation
37 // functions here allows us to implement most resources as a pure "resource 39 // functions here allows us to implement most resources as a pure "resource
38 // API", meaning all calls are routed on a per-resource-object basis. The 40 // API", meaning all calls are routed on a per-resource-object basis. The
39 // creation functions are not per-object (since there's no object during 41 // creation functions are not per-object (since there's no object during
40 // creation) so need functional routing based on the instance ID. 42 // creation) so need functional routing based on the instance ID.
41 class ResourceCreationAPI { 43 class ResourceCreationAPI {
42 public: 44 public:
43 virtual ~ResourceCreationAPI() {} 45 virtual ~ResourceCreationAPI() {}
44 46
45 virtual PP_Resource CreateFileIO(PP_Instance instance) = 0; 47 virtual PP_Resource CreateFileIO(PP_Instance instance) = 0;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 PP_Instance instance, 118 PP_Instance instance,
117 PP_FileChooserMode_Dev mode, 119 PP_FileChooserMode_Dev mode,
118 const char* accept_mime_types) = 0; 120 const char* accept_mime_types) = 0;
119 virtual PP_Resource CreateFlashMenu(PP_Instance instance, 121 virtual PP_Resource CreateFlashMenu(PP_Instance instance,
120 const PP_Flash_Menu* menu_data) = 0; 122 const PP_Flash_Menu* menu_data) = 0;
121 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0; 123 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0;
122 virtual PP_Resource CreateGraphics2D(PP_Instance instance, 124 virtual PP_Resource CreateGraphics2D(PP_Instance instance,
123 const PP_Size& size, 125 const PP_Size& size,
124 PP_Bool is_always_opaque) = 0; 126 PP_Bool is_always_opaque) = 0;
125 virtual PP_Resource CreateGraphics3D(PP_Instance instance, 127 virtual PP_Resource CreateGraphics3D(PP_Instance instance,
126 PP_Resource share_context, 128 PPB_Graphics3D_API* share_context,
127 const int32_t* attrib_list) = 0; 129 const int32_t* attrib_list) = 0;
128 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance, 130 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance,
129 PP_Resource share_context, 131 PPB_Graphics3D_API* share_context,
130 const int32_t* attrib_list) = 0; 132 const int32_t* attrib_list) = 0;
131 virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) = 0; 133 virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) = 0;
132 virtual PP_Resource CreateNetworkMonitor( 134 virtual PP_Resource CreateNetworkMonitor(
133 PP_Instance instance, 135 PP_Instance instance,
134 PPB_NetworkMonitor_Callback callback, 136 PPB_NetworkMonitor_Callback callback,
135 void* user_data) = 0; 137 void* user_data) = 0;
136 virtual PP_Resource CreateScrollbar(PP_Instance instance, 138 virtual PP_Resource CreateScrollbar(PP_Instance instance,
137 PP_Bool vertical) = 0; 139 PP_Bool vertical) = 0;
138 virtual PP_Resource CreateTalk(PP_Instance instance) = 0; 140 virtual PP_Resource CreateTalk(PP_Instance instance) = 0;
139 virtual PP_Resource CreateTCPServerSocketPrivate(PP_Instance instance) = 0; 141 virtual PP_Resource CreateTCPServerSocketPrivate(PP_Instance instance) = 0;
(...skipping 13 matching lines...) Expand all
153 virtual PP_Resource CreateX509CertificatePrivate(PP_Instance instance) = 0; 155 virtual PP_Resource CreateX509CertificatePrivate(PP_Instance instance) = 0;
154 #endif // !defined(OS_NACL) 156 #endif // !defined(OS_NACL)
155 157
156 static const ApiID kApiID = API_ID_RESOURCE_CREATION; 158 static const ApiID kApiID = API_ID_RESOURCE_CREATION;
157 }; 159 };
158 160
159 } // namespace thunk 161 } // namespace thunk
160 } // namespace ppapi 162 } // namespace ppapi
161 163
162 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ 164 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698