| 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 "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "net/proxy/proxy_resolver.h" | 9 #include "net/proxy/proxy_resolver.h" |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 virtual ~ProxyResolverV8(); | 43 virtual ~ProxyResolverV8(); |
| 44 | 44 |
| 45 // ProxyResolver implementation: | 45 // ProxyResolver implementation: |
| 46 virtual int GetProxyForURL(const GURL& url, | 46 virtual int GetProxyForURL(const GURL& url, |
| 47 ProxyInfo* results, | 47 ProxyInfo* results, |
| 48 CompletionCallback* /*callback*/, | 48 CompletionCallback* /*callback*/, |
| 49 RequestHandle* /*request*/, | 49 RequestHandle* /*request*/, |
| 50 const BoundNetLog& net_log); | 50 const BoundNetLog& net_log); |
| 51 virtual void CancelRequest(RequestHandle request); | 51 virtual void CancelRequest(RequestHandle request); |
| 52 virtual void PurgeMemory(); | 52 virtual void PurgeMemory(); |
| 53 virtual void Shutdown(); |
| 53 | 54 |
| 54 ProxyResolverJSBindings* js_bindings() const { return js_bindings_.get(); } | 55 ProxyResolverJSBindings* js_bindings() const { return js_bindings_.get(); } |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 // Context holds the Javascript state for the most recently loaded PAC | 58 // Context holds the Javascript state for the most recently loaded PAC |
| 58 // script. It corresponds with the data from the last call to | 59 // script. It corresponds with the data from the last call to |
| 59 // SetPacScript(). | 60 // SetPacScript(). |
| 60 class Context; | 61 class Context; |
| 61 | 62 |
| 62 // ProxyResolver implementation: | 63 // ProxyResolver implementation: |
| 63 virtual int SetPacScript(const GURL& /*pac_url*/, | 64 virtual int SetPacScript(const GURL& /*pac_url*/, |
| 64 const string16& pac_script, | 65 const string16& pac_script, |
| 65 CompletionCallback* /*callback*/); | 66 CompletionCallback* /*callback*/); |
| 66 scoped_ptr<Context> context_; | 67 scoped_ptr<Context> context_; |
| 67 | 68 |
| 68 scoped_ptr<ProxyResolverJSBindings> js_bindings_; | 69 scoped_ptr<ProxyResolverJSBindings> js_bindings_; |
| 69 | 70 |
| 70 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); | 71 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 } // namespace net | 74 } // namespace net |
| 74 | 75 |
| 75 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ | 76 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ |
| OLD | NEW |