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

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: Documentation Created 7 years, 6 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
(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 class NetworkProxy {
18 public:
19 /// Returns true if the browser supports this API, false otherwise.
20 static bool IsAvailable();
21
22 /// Retrieves the proxy that will be used for the given URL. The result will
23 /// be a string in PAC format. For more details about PAC format, please see
24 /// http://en.wikipedia.org/wiki/Proxy_auto-config
25 ///
26 /// @param[in] instance An <code>InstanceHandle</code> identifying one
27 /// instance of a module.
28 ///
29 /// @param[in] url A string <code>Var</code> containing a URL.
30 ///
31 /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be
32 /// called upon completion. It will be passed a string <code>Var</code>
33 /// containing the appropriate PAC string for <code>url</code>.
34 ///
35 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
36 static int32_t GetProxyForURL(
37 const InstanceHandle& instance,
38 const Var& url,
39 const pp::CompletionCallbackWithOutput<Var>& callback);
40 };
41
42 } // namespace pp
43
44 #endif // PPAPI_CPP_NETWORK_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698