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_ERROR_OBSERVER_H_ | 5 #ifndef NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_H_ |
6 #define NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_H_ | 6 #define NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "net/base/net_api.h" | 11 #include "net/base/net_export.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // Interface for observing JavaScript error messages from PAC scripts. The | 15 // Interface for observing JavaScript error messages from PAC scripts. The |
16 // default implementation of the ProxyResolverJSBindings takes a class | 16 // default implementation of the ProxyResolverJSBindings takes a class |
17 // implementing this interface and forwards all JavaScript errors related to | 17 // implementing this interface and forwards all JavaScript errors related to |
18 // PAC scripts. | 18 // PAC scripts. |
19 class NET_TEST ProxyResolverErrorObserver { | 19 class NET_EXPORT_PRIVATE ProxyResolverErrorObserver { |
20 public: | 20 public: |
21 ProxyResolverErrorObserver() {} | 21 ProxyResolverErrorObserver() {} |
22 virtual ~ProxyResolverErrorObserver() {} | 22 virtual ~ProxyResolverErrorObserver() {} |
23 | 23 |
24 // Handler for when an error is encountered. |line_number| may be -1 | 24 // Handler for when an error is encountered. |line_number| may be -1 |
25 // if a line number is not applicable to this error. |error| is a message | 25 // if a line number is not applicable to this error. |error| is a message |
26 // describing the error. | 26 // describing the error. |
27 virtual void OnPACScriptError(int line_number, const string16& error) = 0; | 27 virtual void OnPACScriptError(int line_number, const string16& error) = 0; |
28 | 28 |
29 private: | 29 private: |
30 DISALLOW_COPY_AND_ASSIGN(ProxyResolverErrorObserver); | 30 DISALLOW_COPY_AND_ASSIGN(ProxyResolverErrorObserver); |
31 }; | 31 }; |
32 | 32 |
33 } // namespace net | 33 } // namespace net |
34 | 34 |
35 #endif // NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_H_ | 35 #endif // NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_H_ |
OLD | NEW |