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

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: revert shim Created 8 years, 2 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
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/pp_bool.h" 10 #include "ppapi/c/pp_bool.h"
(...skipping 12 matching lines...) Expand all
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_FontDescription_Dev;
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 URLRequestInfoData; 32 struct URLRequestInfoData;
33 struct URLResponseInfoData;
33 34
34 namespace thunk { 35 namespace thunk {
35 36
36 // A functional API for creating resource types. Separating out the creation 37 // A functional API for creating resource types. Separating out the creation
37 // functions here allows us to implement most resources as a pure "resource 38 // 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 39 // 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 40 // creation functions are not per-object (since there's no object during
40 // creation) so need functional routing based on the instance ID. 41 // creation) so need functional routing based on the instance ID.
41 class ResourceCreationAPI { 42 class ResourceCreationAPI {
42 public: 43 public:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 PP_InputEvent_Type type, 78 PP_InputEvent_Type type,
78 PP_TimeTicks time_stamp, 79 PP_TimeTicks time_stamp,
79 uint32_t modifiers) = 0; 80 uint32_t modifiers) = 0;
80 virtual PP_Resource CreateResourceArray(PP_Instance instance, 81 virtual PP_Resource CreateResourceArray(PP_Instance instance,
81 const PP_Resource elements[], 82 const PP_Resource elements[],
82 uint32_t size) = 0; 83 uint32_t size) = 0;
83 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0; 84 virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0;
84 virtual PP_Resource CreateURLRequestInfo( 85 virtual PP_Resource CreateURLRequestInfo(
85 PP_Instance instance, 86 PP_Instance instance,
86 const URLRequestInfoData& data) = 0; 87 const URLRequestInfoData& data) = 0;
88
89 // Passed a reference to the file_ref_response, which is a process-locak
bbudge 2012/10/12 01:27:06 s/Passed/Passes s/file_ref_response/file_ref_resou
90 // resource corresponsing to the body_as_file_ref host resource in |data|,
bbudge 2012/10/12 01:27:06 s/corresponsing/corresponding
91 // if there is one.
92 virtual PP_Resource CreateURLResponseInfo(
93 PP_Instance instance,
94 const URLResponseInfoData& data,
95 PP_Resource file_ref_resource) = 0;
96
87 virtual PP_Resource CreateWheelInputEvent( 97 virtual PP_Resource CreateWheelInputEvent(
88 PP_Instance instance, 98 PP_Instance instance,
89 PP_TimeTicks time_stamp, 99 PP_TimeTicks time_stamp,
90 uint32_t modifiers, 100 uint32_t modifiers,
91 const PP_FloatPoint* wheel_delta, 101 const PP_FloatPoint* wheel_delta,
92 const PP_FloatPoint* wheel_ticks, 102 const PP_FloatPoint* wheel_ticks,
93 PP_Bool scroll_by_page) = 0; 103 PP_Bool scroll_by_page) = 0;
94 104
95 virtual PP_Resource CreateAudio(PP_Instance instance, 105 virtual PP_Resource CreateAudio(PP_Instance instance,
96 PP_Resource config_id, 106 PP_Resource config_id,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 PP_VideoDecoder_Profile profile) = 0; 173 PP_VideoDecoder_Profile profile) = 0;
164 #endif // !defined(OS_NACL) 174 #endif // !defined(OS_NACL)
165 175
166 static const ApiID kApiID = API_ID_RESOURCE_CREATION; 176 static const ApiID kApiID = API_ID_RESOURCE_CREATION;
167 }; 177 };
168 178
169 } // namespace thunk 179 } // namespace thunk
170 } // namespace ppapi 180 } // namespace ppapi
171 181
172 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ 182 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698