Pepper_37_C_interfaces
ppb_url_loader_trusted.h
Go to the documentation of this file.
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
3  * found in the LICENSE file.
4  */
5 
6 /* From trusted/ppb_url_loader_trusted.idl modified Wed Oct 5 14:06:02 2011. */
7 
8 #ifndef PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_
9 #define PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_
10 
11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_stdint.h"
15 
16 #define PPB_URLLOADERTRUSTED_INTERFACE_0_3 "PPB_URLLoaderTrusted;0.3"
17 #define PPB_URLLOADERTRUSTED_INTERFACE PPB_URLLOADERTRUSTED_INTERFACE_0_3
18 
19 /**
20  * @file
21  * URL loader trusted interfaces. */
22 
23 
24 /**
25  * @addtogroup Typedefs
26  * @{
27  */
28 /**
29  * Callback that indicates the status of the download and upload for the
30  * given URLLoader resource.
31  */
33  PP_Instance pp_instance,
34  PP_Resource pp_resource,
35  int64_t bytes_sent,
36  int64_t total_bytes_to_be_sent,
37  int64_t bytes_received,
38  int64_t total_bytes_to_be_received);
39 /**
40  * @}
41  */
42 
43 /**
44  * @addtogroup Interfaces
45  * @{
46  */
47 /* Available only to trusted implementations. */
49  /**
50  * Grant this URLLoader the capability to make unrestricted cross-origin
51  * requests.
52  */
54  /**
55  * Registers that the given function will be called when the upload or
56  * downloaded byte count has changed. This is not exposed on the untrusted
57  * interface because it can be quite chatty and encourages people to write
58  * feedback UIs that update as frequently as the progress updates.
59  *
60  * The other serious gotcha with this callback is that the callback must not
61  * mutate the URL loader or cause it to be destroyed.
62  *
63  * However, the proxy layer needs this information to push to the other
64  * process, so we expose it here. Only one callback can be set per URL
65  * Loader. Setting to a NULL callback will disable it.
66  */
69 };
70 
72 /**
73  * @}
74  */
75 
76 #endif /* PPAPI_C_TRUSTED_PPB_URL_LOADER_TRUSTED_H_ */
77 
void(* RegisterStatusCallback)(PP_Resource loader, PP_URLLoaderTrusted_StatusCallback cb)
int32_t PP_Resource
Definition: pp_resource.h:40
int32_t PP_Instance
Definition: pp_instance.h:34
void(* GrantUniversalAccess)(PP_Resource loader)
void(* PP_URLLoaderTrusted_StatusCallback)(PP_Instance pp_instance, PP_Resource pp_resource, int64_t bytes_sent, int64_t total_bytes_to_be_sent, int64_t bytes_received, int64_t total_bytes_to_be_received)