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

Side by Side Diff: ppapi/c/trusted/ppb_url_loader_trusted.h

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

Powered by Google App Engine
This is Rietveld 408576698