Fix not-authorized error message.
[chromium-blink-merge.git] / ppapi / api / ppb_network_proxy.idl
blob6957f4a6babe237b5f72182e05a40f45a3e71a01
1 /* Copyright 2013 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 /**
7 * This file defines the <code>PPB_NetworkProxy</code> interface.
8 */
10 [generate_thunk]
12 label Chrome {
13 M29 = 1.0
16 /**
17 * This interface provides a way to determine the appropriate proxy settings
18 * for a given URL.
20 * Permissions: Apps permission <code>socket</code> with subrule
21 * <code>resolve-proxy</code> is required for using this API.
22 * For more details about network communication permissions, please see:
23 * http://developer.chrome.com/apps/app_network.html
25 [singleton]
26 interface PPB_NetworkProxy {
27 /**
28 * Retrieves the proxy that will be used for the given URL. The result will
29 * be a string in PAC format. For more details about PAC format, please see
30 * http://en.wikipedia.org/wiki/Proxy_auto-config
32 * @param[in] instance A <code>PP_Instance</code> identifying one instance
33 * of a module.
35 * @param[in] url A string <code>PP_Var</code> containing a URL.
37 * @param[out] proxy_string A <code>PP_Var</code> that GetProxyForURL will
38 * set upon successful completion. If the call fails, <code>proxy_string
39 * </code> will be unchanged. Otherwise, it will be set to a string <code>
40 * PP_Var</code> containing the appropriate PAC string for <code>url</code>.
41 * If set, <code>proxy_string</code> will have a reference count of 1 which
42 * the plugin must manage.
44 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
45 * completion.
47 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
49 int32_t GetProxyForURL([in] PP_Instance instance,
50 [in] PP_Var url,
51 [out] PP_Var proxy_string,
52 [in] PP_CompletionCallback callback);