Fix iOS build for XCode 4.6.
[chromium-blink-merge.git] / ppapi / api / trusted / ppb_url_loader_trusted.idl
blob19156f4f452c8b839fa7458551fbef042e752dc5
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 */
6 /* URL loader trusted interfaces. */
8 label Chrome {
9 M14 = 0.3
12 /**
13 * Callback that indicates the status of the download and upload for the
14 * given URLLoader resource.
16 typedef void PP_URLLoaderTrusted_StatusCallback(
17 [in] PP_Instance pp_instance,
18 [in] PP_Resource pp_resource,
19 [in] int64_t bytes_sent,
20 [in] int64_t total_bytes_to_be_sent,
21 [in] int64_t bytes_received,
22 [in] int64_t total_bytes_to_be_received);
24 /* Available only to trusted implementations. */
25 interface PPB_URLLoaderTrusted {
26 /**
27 * Grant this URLLoader the capability to make unrestricted cross-origin
28 * requests.
30 void GrantUniversalAccess([in] PP_Resource loader);
32 /**
33 * Registers that the given function will be called when the upload or
34 * downloaded byte count has changed. This is not exposed on the untrusted
35 * interface because it can be quite chatty and encourages people to write
36 * feedback UIs that update as frequently as the progress updates.
38 * The other serious gotcha with this callback is that the callback must not
39 * mutate the URL loader or cause it to be destroyed.
41 * However, the proxy layer needs this information to push to the other
42 * process, so we expose it here. Only one callback can be set per URL
43 * Loader. Setting to a NULL callback will disable it.
45 void RegisterStatusCallback(
46 [in] PP_Resource loader,
47 [in] PP_URLLoaderTrusted_StatusCallback cb);