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

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: Address comments; remove createOffscreenGraphicsContext3D Created 8 years, 7 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 PP_Instance instance, 105 PP_Instance instance,
104 PP_FileChooserMode_Dev mode, 106 PP_FileChooserMode_Dev mode,
105 const char* accept_mime_types) = 0; 107 const char* accept_mime_types) = 0;
106 virtual PP_Resource CreateFlashMenu(PP_Instance instance, 108 virtual PP_Resource CreateFlashMenu(PP_Instance instance,
107 const PP_Flash_Menu* menu_data) = 0; 109 const PP_Flash_Menu* menu_data) = 0;
108 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0; 110 virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0;
109 virtual PP_Resource CreateGraphics2D(PP_Instance instance, 111 virtual PP_Resource CreateGraphics2D(PP_Instance instance,
110 const PP_Size& size, 112 const PP_Size& size,
111 PP_Bool is_always_opaque) = 0; 113 PP_Bool is_always_opaque) = 0;
112 virtual PP_Resource CreateGraphics3D(PP_Instance instance, 114 virtual PP_Resource CreateGraphics3D(PP_Instance instance,
113 PP_Resource share_context, 115 PPB_Graphics3D_API* share_context,
114 const int32_t* attrib_list) = 0; 116 const int32_t* attrib_list) = 0;
115 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance, 117 virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance,
116 PP_Resource share_context, 118 PPB_Graphics3D_API* share_context,
117 const int32_t* attrib_list) = 0; 119 const int32_t* attrib_list) = 0;
118 virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) = 0; 120 virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) = 0;
119 virtual PP_Resource CreateImageData(PP_Instance instance, 121 virtual PP_Resource CreateImageData(PP_Instance instance,
120 PP_ImageDataFormat format, 122 PP_ImageDataFormat format,
121 const PP_Size& size, 123 const PP_Size& size,
122 PP_Bool init_to_zero) = 0; 124 PP_Bool init_to_zero) = 0;
123 virtual PP_Resource CreateNetworkMonitor( 125 virtual PP_Resource CreateNetworkMonitor(
124 PP_Instance instance, 126 PP_Instance instance,
125 PPB_NetworkMonitor_Callback callback, 127 PPB_NetworkMonitor_Callback callback,
126 void* user_data) = 0; 128 void* user_data) = 0;
(...skipping 17 matching lines...) Expand all
144 virtual PP_Resource CreateX509CertificatePrivate(PP_Instance instance) = 0; 146 virtual PP_Resource CreateX509CertificatePrivate(PP_Instance instance) = 0;
145 #endif // !defined(OS_NACL) 147 #endif // !defined(OS_NACL)
146 148
147 static const ApiID kApiID = API_ID_RESOURCE_CREATION; 149 static const ApiID kApiID = API_ID_RESOURCE_CREATION;
148 }; 150 };
149 151
150 } // namespace thunk 152 } // namespace thunk
151 } // namespace ppapi 153 } // namespace ppapi
152 154
153 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ 155 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698