OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_MOJO_H_ |
| 6 #define NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_MOJO_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/interfaces/proxy_resolver_service.mojom.h" |
| 11 #include "net/proxy/proxy_resolver_error_observer.h" |
| 12 |
| 13 namespace net { |
| 14 |
| 15 // An implementation of ProxyResolverErrorObserver that forwards errors to an |
| 16 // interfaces::ProxyResolverErrorObserver mojo interface. |
| 17 class ProxyResolverErrorObserverMojo : public ProxyResolverErrorObserver { |
| 18 public: |
| 19 static scoped_ptr<ProxyResolverErrorObserver> Create( |
| 20 interfaces::ProxyResolverErrorObserverPtr error_observer); |
| 21 |
| 22 void OnPACScriptError(int line_number, const base::string16& error) override; |
| 23 |
| 24 private: |
| 25 class Core; |
| 26 |
| 27 ProxyResolverErrorObserverMojo( |
| 28 interfaces::ProxyResolverErrorObserverPtr error_observer); |
| 29 ~ProxyResolverErrorObserverMojo() override; |
| 30 |
| 31 scoped_refptr<Core> core_; |
| 32 }; |
| 33 |
| 34 } // namespace net |
| 35 |
| 36 #endif // NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_MOJO_H_ |
OLD | NEW |