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 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual ~ProxyResolverV8(); | 79 virtual ~ProxyResolverV8(); |
80 | 80 |
81 JSBindings* js_bindings() const { return js_bindings_; } | 81 JSBindings* js_bindings() const { return js_bindings_; } |
82 void set_js_bindings(JSBindings* js_bindings) { js_bindings_ = js_bindings; } | 82 void set_js_bindings(JSBindings* js_bindings) { js_bindings_ = js_bindings; } |
83 | 83 |
84 // ProxyResolver implementation: | 84 // ProxyResolver implementation: |
85 virtual int GetProxyForURL(const GURL& url, | 85 virtual int GetProxyForURL(const GURL& url, |
86 ProxyInfo* results, | 86 ProxyInfo* results, |
87 const net::CompletionCallback& /*callback*/, | 87 const net::CompletionCallback& /*callback*/, |
88 RequestHandle* /*request*/, | 88 RequestHandle* /*request*/, |
89 const BoundNetLog& net_log) OVERRIDE; | 89 const BoundNetLog& net_log) override; |
90 virtual void CancelRequest(RequestHandle request) OVERRIDE; | 90 virtual void CancelRequest(RequestHandle request) override; |
91 virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE; | 91 virtual LoadState GetLoadState(RequestHandle request) const override; |
92 virtual void CancelSetPacScript() OVERRIDE; | 92 virtual void CancelSetPacScript() override; |
93 virtual int SetPacScript( | 93 virtual int SetPacScript( |
94 const scoped_refptr<ProxyResolverScriptData>& script_data, | 94 const scoped_refptr<ProxyResolverScriptData>& script_data, |
95 const net::CompletionCallback& /*callback*/) OVERRIDE; | 95 const net::CompletionCallback& /*callback*/) override; |
96 | 96 |
97 // Create an isolate to use for the proxy resolver. If the embedder invokes | 97 // Create an isolate to use for the proxy resolver. If the embedder invokes |
98 // this method multiple times, it must be invoked in a thread safe manner, | 98 // this method multiple times, it must be invoked in a thread safe manner, |
99 // e.g. always from the same thread. | 99 // e.g. always from the same thread. |
100 static void EnsureIsolateCreated(); | 100 static void EnsureIsolateCreated(); |
101 | 101 |
102 static v8::Isolate* GetDefaultIsolate(); | 102 static v8::Isolate* GetDefaultIsolate(); |
103 | 103 |
104 // Get total/ued heap memory usage of all v8 instances used by the proxy | 104 // Get total/ued heap memory usage of all v8 instances used by the proxy |
105 // resolver. | 105 // resolver. |
(...skipping 11 matching lines...) Expand all Loading... |
117 scoped_ptr<Context> context_; | 117 scoped_ptr<Context> context_; |
118 | 118 |
119 JSBindings* js_bindings_; | 119 JSBindings* js_bindings_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); | 121 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace net | 124 } // namespace net |
125 | 125 |
126 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ | 126 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ |
OLD | NEW |