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

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

Issue 10993031: Refactor the URLResponseInfo to use new design (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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_url_response_info_api.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | 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) 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_file_chooser_dev.h" 8 #include "ppapi/c/dev/ppb_file_chooser_dev.h"
9 #include "ppapi/c/pp_bool.h" 9 #include "ppapi/c/pp_bool.h"
10 #include "ppapi/c/pp_instance.h" 10 #include "ppapi/c/pp_instance.h"
(...skipping 11 matching lines...) Expand all
22 #include "ppapi/shared_impl/api_id.h" 22 #include "ppapi/shared_impl/api_id.h"
23 23
24 struct PP_Flash_Menu; 24 struct PP_Flash_Menu;
25 struct PP_FontDescription_Dev; 25 struct PP_FontDescription_Dev;
26 struct PP_BrowserFont_Trusted_Description; 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 URLRequestInfoData; 31 struct URLRequestInfoData;
32 struct URLResponseInfoData;
32 33
33 namespace thunk { 34 namespace thunk {
34 35
35 // A functional API for creating resource types. Separating out the creation 36 // A functional API for creating resource types. Separating out the creation
36 // functions here allows us to implement most resources as a pure "resource 37 // functions here allows us to implement most resources as a pure "resource
37 // API", meaning all calls are routed on a per-resource-object basis. The 38 // API", meaning all calls are routed on a per-resource-object basis. The
38 // creation functions are not per-object (since there's no object during 39 // creation functions are not per-object (since there's no object during
39 // creation) so need functional routing based on the instance ID. 40 // creation) so need functional routing based on the instance ID.
40 class ResourceCreationAPI { 41 class ResourceCreationAPI {
41 public: 42 public:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 PP_InputEvent_Type type, 77 PP_InputEvent_Type type,
77 PP_TimeTicks time_stamp, 78 PP_TimeTicks time_stamp,
78 uint32_t modifiers) = 0; 79 uint32_t modifiers) = 0;
79 virtual PP_Resource CreateResourceArray(PP_Instance instance, 80 virtual PP_Resource CreateResourceArray(PP_Instance instance,
80 const PP_Resource elements[], 81 const PP_Resource elements[],
81 uint32_t size) = 0; 82 uint32_t size) = 0;
82 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0; 83 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0;
83 virtual PP_Resource CreateURLRequestInfo( 84 virtual PP_Resource CreateURLRequestInfo(
84 PP_Instance instance, 85 PP_Instance instance,
85 const URLRequestInfoData& data) = 0; 86 const URLRequestInfoData& data) = 0;
87
88 // Passes a reference to the file_ref_resource, which is a process-local
89 // resource corresponding to the body_as_file_ref host resource in |data|,
90 // if there is one.
91 virtual PP_Resource CreateURLResponseInfo(
92 PP_Instance instance,
93 const URLResponseInfoData& data,
94 PP_Resource file_ref_resource) = 0;
95
86 virtual PP_Resource CreateWheelInputEvent( 96 virtual PP_Resource CreateWheelInputEvent(
87 PP_Instance instance, 97 PP_Instance instance,
88 PP_TimeTicks time_stamp, 98 PP_TimeTicks time_stamp,
89 uint32_t modifiers, 99 uint32_t modifiers,
90 const PP_FloatPoint* wheel_delta, 100 const PP_FloatPoint* wheel_delta,
91 const PP_FloatPoint* wheel_ticks, 101 const PP_FloatPoint* wheel_ticks,
92 PP_Bool scroll_by_page) = 0; 102 PP_Bool scroll_by_page) = 0;
93 103
94 virtual PP_Resource CreateAudio(PP_Instance instance, 104 virtual PP_Resource CreateAudio(PP_Instance instance,
95 PP_Resource config_id, 105 PP_Resource config_id,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 PP_VideoDecoder_Profile profile) = 0; 167 PP_VideoDecoder_Profile profile) = 0;
158 #endif // !defined(OS_NACL) 168 #endif // !defined(OS_NACL)
159 169
160 static const ApiID kApiID = API_ID_RESOURCE_CREATION; 170 static const ApiID kApiID = API_ID_RESOURCE_CREATION;
161 }; 171 };
162 172
163 } // namespace thunk 173 } // namespace thunk
164 } // namespace ppapi 174 } // namespace ppapi
165 175
166 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ 176 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_url_response_info_api.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698