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

Side by Side Diff: ppapi/cpp/network_proxy.h

Issue 17004010: PPAPI: Move PPB_NetworkProxy out of Dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 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
« no previous file with comments | « ppapi/cpp/dev/network_proxy_dev.cc ('k') | ppapi/cpp/network_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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
5 #ifndef PPAPI_CPP_NETWORK_PROXY_H_
6 #define PPAPI_CPP_NETWORK_PROXY_H_
7
8 #include <string>
9
10 #include "ppapi/cpp/completion_callback.h"
11 #include "ppapi/cpp/instance_handle.h"
12
13 namespace pp {
14
15 /// This class provides a way to determine the appropriate proxy settings for
16 /// for a given URL.
17 ///
18 /// Permissions: Apps permission <code>socket</code> with subrule
19 /// <code>resolve-proxy</code> is required for using this API.
20 /// For more details about network communication permissions, please see:
21 /// http://developer.chrome.com/apps/app_network.html
22 class NetworkProxy {
23 public:
24 /// Returns true if the browser supports this API, false otherwise.
25 static bool IsAvailable();
26
27 /// Retrieves the proxy that will be used for the given URL. The result will
28 /// be a string in PAC format. For more details about PAC format, please see
29 /// http://en.wikipedia.org/wiki/Proxy_auto-config
30 ///
31 /// @param[in] instance An <code>InstanceHandle</code> identifying one
32 /// instance of a module.
33 ///
34 /// @param[in] url A string <code>Var</code> containing a URL.
35 ///
36 /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be
37 /// called upon completion. It will be passed a string <code>Var</code>
38 /// containing the appropriate PAC string for <code>url</code>.
39 ///
40 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
41 static int32_t GetProxyForURL(
42 const InstanceHandle& instance,
43 const Var& url,
44 const pp::CompletionCallbackWithOutput<Var>& callback);
45 };
46
47 } // namespace pp
48
49 #endif // PPAPI_CPP_NETWORK_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/network_proxy_dev.cc ('k') | ppapi/cpp/network_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698