Fix issue with longpress drag selection motion
[chromium-blink-merge.git] / net / proxy / network_delegate_error_observer.h
blob2463913ff651aba04ee7a65da1166bfb622e5146
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
3 // found in the LICENSE file.
5 #ifndef NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_
6 #define NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "net/proxy/proxy_resolver_error_observer.h"
13 namespace base {
14 class SingleThreadTaskRunner;
17 namespace net {
19 class NetworkDelegate;
21 // An implementation of ProxyResolverErrorObserver that forwards PAC script
22 // errors to a NetworkDelegate object on the thread it lives on.
23 class NET_EXPORT_PRIVATE NetworkDelegateErrorObserver
24 : public ProxyResolverErrorObserver {
25 public:
26 NetworkDelegateErrorObserver(NetworkDelegate* network_delegate,
27 base::SingleThreadTaskRunner* origin_runner);
28 ~NetworkDelegateErrorObserver() override;
30 static scoped_ptr<ProxyResolverErrorObserver> Create(
31 NetworkDelegate* network_delegate,
32 const scoped_refptr<base::SingleThreadTaskRunner>& origin_runner);
34 // ProxyResolverErrorObserver implementation.
35 void OnPACScriptError(int line_number, const base::string16& error) override;
37 private:
38 class Core;
40 scoped_refptr<Core> core_;
42 DISALLOW_COPY_AND_ASSIGN(NetworkDelegateErrorObserver);
45 } // namespace net
47 #endif // NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_