Index: net/proxy/proxy_resolver_error_observer_mojo.h |
diff --git a/net/proxy/proxy_resolver_error_observer_mojo.h b/net/proxy/proxy_resolver_error_observer_mojo.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..44322408d5da3b4058ea9e9879f5246b896748c4 |
--- /dev/null |
+++ b/net/proxy/proxy_resolver_error_observer_mojo.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_MOJO_H_ |
+#define NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_MOJO_H_ |
+ |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "net/interfaces/proxy_resolver_service.mojom.h" |
+#include "net/proxy/proxy_resolver_error_observer.h" |
+ |
+namespace net { |
+ |
+// An implementation of ProxyResolverErrorObserver that forwards errors to an |
+// interfaces::ProxyResolverErrorObserver mojo interface. |
+class ProxyResolverErrorObserverMojo : public ProxyResolverErrorObserver { |
+ public: |
+ static scoped_ptr<ProxyResolverErrorObserver> Create( |
+ interfaces::ProxyResolverErrorObserverPtr error_observer); |
+ |
+ void OnPACScriptError(int line_number, const base::string16& error) override; |
+ |
+ private: |
+ class Core; |
+ |
+ ProxyResolverErrorObserverMojo( |
+ interfaces::ProxyResolverErrorObserverPtr error_observer); |
+ ~ProxyResolverErrorObserverMojo() override; |
+ |
+ scoped_refptr<Core> core_; |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_MOJO_H_ |