| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // is destroyed. | 40 // is destroyed. |
| 41 explicit ProxyResolverV8(ProxyResolverJSBindings* custom_js_bindings); | 41 explicit ProxyResolverV8(ProxyResolverJSBindings* custom_js_bindings); |
| 42 | 42 |
| 43 virtual ~ProxyResolverV8(); | 43 virtual ~ProxyResolverV8(); |
| 44 | 44 |
| 45 ProxyResolverJSBindings* js_bindings() const { return js_bindings_.get(); } | 45 ProxyResolverJSBindings* js_bindings() const { return js_bindings_.get(); } |
| 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 OldCompletionCallback* /*callback*/, | 50 const net::CompletionCallback& /*callback*/, |
| 51 RequestHandle* /*request*/, | 51 RequestHandle* /*request*/, |
| 52 const BoundNetLog& net_log) OVERRIDE; | 52 const BoundNetLog& net_log) OVERRIDE; |
| 53 virtual void CancelRequest(RequestHandle request) OVERRIDE; | 53 virtual void CancelRequest(RequestHandle request) OVERRIDE; |
| 54 virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE; | 54 virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE; |
| 55 virtual LoadState GetLoadStateThreadSafe( | 55 virtual LoadState GetLoadStateThreadSafe( |
| 56 RequestHandle request) const OVERRIDE; | 56 RequestHandle request) const OVERRIDE; |
| 57 virtual void CancelSetPacScript() OVERRIDE; | 57 virtual void CancelSetPacScript() OVERRIDE; |
| 58 virtual void PurgeMemory() OVERRIDE; | 58 virtual void PurgeMemory() OVERRIDE; |
| 59 virtual void Shutdown() OVERRIDE; | 59 virtual void Shutdown() OVERRIDE; |
| 60 virtual int SetPacScript( | 60 virtual int SetPacScript( |
| 61 const scoped_refptr<ProxyResolverScriptData>& script_data, | 61 const scoped_refptr<ProxyResolverScriptData>& script_data, |
| 62 OldCompletionCallback* /*callback*/) OVERRIDE; | 62 const net::CompletionCallback& /*callback*/) OVERRIDE; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // Context holds the Javascript state for the most recently loaded PAC | 65 // Context holds the Javascript state for the most recently loaded PAC |
| 66 // script. It corresponds with the data from the last call to | 66 // script. It corresponds with the data from the last call to |
| 67 // SetPacScript(). | 67 // SetPacScript(). |
| 68 class Context; | 68 class Context; |
| 69 scoped_ptr<Context> context_; | 69 scoped_ptr<Context> context_; |
| 70 | 70 |
| 71 scoped_ptr<ProxyResolverJSBindings> js_bindings_; | 71 scoped_ptr<ProxyResolverJSBindings> js_bindings_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); | 73 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace net | 76 } // namespace net |
| 77 | 77 |
| 78 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ | 78 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ |
| OLD | NEW |