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

Side by Side Diff: ppapi/c/private/ppb_proxy_private.h

Issue 14371021: Implementation of URLLoader using PluginResource/ResourceHost. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase, track src/webkit gypi changes. Created 7 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
« no previous file with comments | « ppapi/c/ppp_instance.h ('k') | ppapi/ppapi_proxy.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_C_PRIVATE_PROXY_PRIVATE_H_ 5 #ifndef PPAPI_C_PRIVATE_PROXY_PRIVATE_H_
6 #define PPAPI_C_PRIVATE_PROXY_PRIVATE_H_ 6 #define PPAPI_C_PRIVATE_PROXY_PRIVATE_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_module.h" 10 #include "ppapi/c/pp_module.h"
11 #include "ppapi/c/pp_resource.h" 11 #include "ppapi/c/pp_resource.h"
12 12
13 #define PPB_PROXY_PRIVATE_INTERFACE "PPB_Proxy_Private;5" 13 #define PPB_PROXY_PRIVATE_INTERFACE "PPB_Proxy_Private;6"
14 14
15 // Exposes functions needed by the out-of-process proxy to call into the 15 // Exposes functions needed by the out-of-process proxy to call into the
16 // renderer PPAPI implementation. 16 // renderer PPAPI implementation.
17 struct PPB_Proxy_Private { 17 struct PPB_Proxy_Private {
18 // Called when the given plugin process has crashed. 18 // Called when the given plugin process has crashed.
19 void (*PluginCrashed)(PP_Module module); 19 void (*PluginCrashed)(PP_Module module);
20 20
21 // Returns the instance for the given resource, or 0 on failure. 21 // Returns the instance for the given resource, or 0 on failure.
22 PP_Instance (*GetInstanceForResource)(PP_Resource resource); 22 PP_Instance (*GetInstanceForResource)(PP_Resource resource);
23 23
24 // Sets a callback that will be used to make sure that PP_Instance IDs 24 // Sets a callback that will be used to make sure that PP_Instance IDs
25 // are unique in the plugin. 25 // are unique in the plugin.
26 // 26 //
27 // Since the plugin may be shared between several browser processes, we need 27 // Since the plugin may be shared between several browser processes, we need
28 // to do extra work to make sure that an instance ID is globally unqiue. The 28 // to do extra work to make sure that an instance ID is globally unqiue. The
29 // given function will be called and will return true if the given 29 // given function will be called and will return true if the given
30 // PP_Instance is OK to use in the plugin. It will then be marked as "in use" 30 // PP_Instance is OK to use in the plugin. It will then be marked as "in use"
31 // On failure (returns false), the host implementation will generate a new 31 // On failure (returns false), the host implementation will generate a new
32 // instance ID and try again. 32 // instance ID and try again.
33 void (*SetReserveInstanceIDCallback)( 33 void (*SetReserveInstanceIDCallback)(
34 PP_Module module, 34 PP_Module module,
35 PP_Bool (*is_seen)(PP_Module, PP_Instance)); 35 PP_Bool (*is_seen)(PP_Module, PP_Instance));
36 36
37 // Returns the number of bytes synchronously readable out of the URLLoader's
38 // buffer. Returns 0 on failure or if the url loader doesn't have any data
39 // now.
40 int32_t (*GetURLLoaderBufferedBytes)(PP_Resource url_loader);
41
42 // Allows adding additional refcounts to the PluginModule that owns the 37 // Allows adding additional refcounts to the PluginModule that owns the
43 // proxy dispatcher (and all interface proxies). For every AddRef call 38 // proxy dispatcher (and all interface proxies). For every AddRef call
44 // there must be a corresponding release call. 39 // there must be a corresponding release call.
45 void (*AddRefModule)(PP_Module module); 40 void (*AddRefModule)(PP_Module module);
46 void (*ReleaseModule)(PP_Module module); 41 void (*ReleaseModule)(PP_Module module);
47 42
48 // Allows asserts to be written for some bad conditions while cleaning up. 43 // Allows asserts to be written for some bad conditions while cleaning up.
49 PP_Bool (*IsInModuleDestructor)(PP_Module module); 44 PP_Bool (*IsInModuleDestructor)(PP_Module module);
50 }; 45 };
51 46
52 #endif // PPAPI_C_PRIVATE_PROXY_PRIVATE_H_ 47 #endif // PPAPI_C_PRIVATE_PROXY_PRIVATE_H_
OLDNEW
« no previous file with comments | « ppapi/c/ppp_instance.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698