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

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

Issue 11416064: Convert URLLoader to the new proxy design (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments, merge Created 8 years 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_loader_thunk.cc ('k') | ppapi/thunk/thunk.h » ('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 10 matching lines...) Expand all
21 #include "ppapi/c/private/ppb_network_monitor_private.h" 21 #include "ppapi/c/private/ppb_network_monitor_private.h"
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 PPB_FileRef_CreateInfo;
31 struct URLRequestInfoData; 32 struct URLRequestInfoData;
32 struct URLResponseInfoData; 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:
43 virtual ~ResourceCreationAPI() {} 44 virtual ~ResourceCreationAPI() {}
44 45
45 virtual PP_Resource CreateFileIO(PP_Instance instance) = 0; 46 virtual PP_Resource CreateFileIO(PP_Instance instance) = 0;
46 virtual PP_Resource CreateFileRef(PP_Resource file_system, 47 virtual PP_Resource CreateFileRef(PP_Resource file_system,
47 const char* path) = 0; 48 const char* path) = 0;
49
50 // Like the above version but takes a serialized file ref. The resource
51 // in the serialized file ref is passed into this, which takes ownership of
52 // the reference. In the proxy, the return value will be a plugin resource,
53 // in the impl, the return value will be the same resource ID.
54 virtual PP_Resource CreateFileRef(
55 const PPB_FileRef_CreateInfo& serialized) = 0;
56
48 virtual PP_Resource CreateFileSystem(PP_Instance instance, 57 virtual PP_Resource CreateFileSystem(PP_Instance instance,
49 PP_FileSystemType type) = 0; 58 PP_FileSystemType type) = 0;
50 virtual PP_Resource CreateIMEInputEvent(PP_Instance instance, 59 virtual PP_Resource CreateIMEInputEvent(PP_Instance instance,
51 PP_InputEvent_Type type, 60 PP_InputEvent_Type type,
52 PP_TimeTicks time_stamp, 61 PP_TimeTicks time_stamp,
53 struct PP_Var text, 62 struct PP_Var text,
54 uint32_t segment_number, 63 uint32_t segment_number,
55 const uint32_t* segment_offsets, 64 const uint32_t* segment_offsets,
56 int32_t target_segment, 65 int32_t target_segment,
57 uint32_t selection_start, 66 uint32_t selection_start,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 PP_VideoDecoder_Profile profile) = 0; 175 PP_VideoDecoder_Profile profile) = 0;
167 #endif // !defined(OS_NACL) 176 #endif // !defined(OS_NACL)
168 177
169 static const ApiID kApiID = API_ID_RESOURCE_CREATION; 178 static const ApiID kApiID = API_ID_RESOURCE_CREATION;
170 }; 179 };
171 180
172 } // namespace thunk 181 } // namespace thunk
173 } // namespace ppapi 182 } // namespace ppapi
174 183
175 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_ 184 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_url_loader_thunk.cc ('k') | ppapi/thunk/thunk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698