Rename ProxyResolverV8::JSBindings --> ProxyResolverJSBindings.

(Since it isn't really V8-specific, and could be re-used for impelmentations
using a different JS engine).

Review URL: http://codereview.chromium.org/159773

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22256 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h
index 4c364e5b..6689191e 100644
--- a/net/proxy/proxy_resolver_v8.h
+++ b/net/proxy/proxy_resolver_v8.h
@@ -15,6 +15,7 @@
 namespace net {
 
 class HostResolver;
+class ProxyResolverJSBindings;
 
 // Implementation of ProxyResolver that uses V8 to evaluate PAC scripts.
 //
@@ -36,12 +37,10 @@
 // and does not use locking since it expects to be alone.
 class ProxyResolverV8 : public ProxyResolver {
  public:
-  class JSBindings;
-
   // Constructs a ProxyResolverV8 with custom bindings. ProxyResolverV8 takes
   // ownership of |custom_js_bindings| and deletes it when ProxyResolverV8
   // is destroyed.
-  explicit ProxyResolverV8(JSBindings* custom_js_bindings);
+  explicit ProxyResolverV8(ProxyResolverJSBindings* custom_js_bindings);
 
   virtual ~ProxyResolverV8();
 
@@ -52,22 +51,7 @@
                              RequestHandle* /*request*/);
   virtual void CancelRequest(RequestHandle request);
 
-  JSBindings* js_bindings() const { return js_bindings_.get(); }
-
-  // Creates a default javascript bindings implementation that will:
-  //   - Send script error messages to LOG(INFO)
-  //   - Send script alert()s to LOG(INFO)
-  //   - Use the provided host resolver to service dnsResolve().
-  //
-  // For clients that need more control (for example, sending the script output
-  // to a UI widget), use the ProxyResolverV8(JSBindings*) and specify your
-  // own bindings.
-  //
-  // |host_resolver| will be used in async mode on |host_resolver_loop|. If
-  // |host_resolver_loop| is NULL, then |host_resolver| will be used in sync
-  // mode on the PAC thread.
-  static JSBindings* CreateDefaultBindings(HostResolver* host_resolver,
-                                           MessageLoop* host_resolver_loop);
+  ProxyResolverJSBindings* js_bindings() const { return js_bindings_.get(); }
 
  private:
   // Context holds the Javascript state for the most recently loaded PAC
@@ -80,30 +64,11 @@
 
   scoped_ptr<Context> context_;
 
-  scoped_ptr<JSBindings> js_bindings_;
+  scoped_ptr<ProxyResolverJSBindings> js_bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8);
 };
 
-// Interface for the javascript bindings.
-class ProxyResolverV8::JSBindings {
- public:
-  virtual ~JSBindings() {}
-
-  // Handler for "alert(message)"
-  virtual void Alert(const std::string& message) = 0;
-
-  // Handler for "myIpAddress()". Returns empty string on failure.
-  virtual std::string MyIpAddress() = 0;
-
-  // Handler for "dnsResolve(host)". Returns empty string on failure.
-  virtual std::string DnsResolve(const std::string& host) = 0;
-
-  // Handler for when an error is encountered. |line_number| may be -1
-  // if a line number is not applicable to this error.
-  virtual void OnError(int line_number, const std::string& error) = 0;
-};
-
 }  // namespace net
 
 #endif  // NET_PROXY_PROXY_RESOLVER_V8_H_