OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 NET_PROXY_PROXY_RESOLVER_V8_H_ | 5 #ifndef NET_PROXY_PROXY_RESOLVER_V8_H_ |
6 #define NET_PROXY_PROXY_RESOLVER_V8_H_ | 6 #define NET_PROXY_PROXY_RESOLVER_V8_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // is destroyed. | 42 // is destroyed. |
43 explicit ProxyResolverV8(ProxyResolverJSBindings* custom_js_bindings); | 43 explicit ProxyResolverV8(ProxyResolverJSBindings* custom_js_bindings); |
44 | 44 |
45 virtual ~ProxyResolverV8(); | 45 virtual ~ProxyResolverV8(); |
46 | 46 |
47 // ProxyResolver implementation: | 47 // ProxyResolver implementation: |
48 virtual int GetProxyForURL(const GURL& url, | 48 virtual int GetProxyForURL(const GURL& url, |
49 ProxyInfo* results, | 49 ProxyInfo* results, |
50 CompletionCallback* /*callback*/, | 50 CompletionCallback* /*callback*/, |
51 RequestHandle* /*request*/, | 51 RequestHandle* /*request*/, |
52 LoadLog* load_log); | 52 const BoundNetLog& net_log); |
53 virtual void CancelRequest(RequestHandle request); | 53 virtual void CancelRequest(RequestHandle request); |
54 virtual void PurgeMemory(); | 54 virtual void PurgeMemory(); |
55 | 55 |
56 ProxyResolverJSBindings* js_bindings() const { return js_bindings_.get(); } | 56 ProxyResolverJSBindings* js_bindings() const { return js_bindings_.get(); } |
57 | 57 |
58 private: | 58 private: |
59 // Context holds the Javascript state for the most recently loaded PAC | 59 // Context holds the Javascript state for the most recently loaded PAC |
60 // script. It corresponds with the data from the last call to | 60 // script. It corresponds with the data from the last call to |
61 // SetPacScript(). | 61 // SetPacScript(). |
62 class Context; | 62 class Context; |
63 | 63 |
64 // ProxyResolver implementation: | 64 // ProxyResolver implementation: |
65 virtual int SetPacScript(const GURL& /*pac_url*/, | 65 virtual int SetPacScript(const GURL& /*pac_url*/, |
66 const std::string& bytes_utf8, | 66 const std::string& bytes_utf8, |
67 CompletionCallback* /*callback*/); | 67 CompletionCallback* /*callback*/); |
68 scoped_ptr<Context> context_; | 68 scoped_ptr<Context> context_; |
69 | 69 |
70 scoped_ptr<ProxyResolverJSBindings> js_bindings_; | 70 scoped_ptr<ProxyResolverJSBindings> js_bindings_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); | 72 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace net | 75 } // namespace net |
76 | 76 |
77 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ | 77 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ |
OLD | NEW |