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_PROXY_RESOLVER_ERROR_OBSERVER_H_
6 #define NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_H_
8 #include "base/basictypes.h"
9 #include "base/string16.h"
10 #include "net/base/net_export.h"
14 // Interface for observing JavaScript error messages from PAC scripts. The
15 // default implementation of the ProxyResolverJSBindings takes a class
16 // implementing this interface and forwards all JavaScript errors related to
18 class NET_EXPORT_PRIVATE ProxyResolverErrorObserver
{
20 ProxyResolverErrorObserver() {}
21 virtual ~ProxyResolverErrorObserver() {}
23 // Handler for when an error is encountered. |line_number| may be -1
24 // if a line number is not applicable to this error. |error| is a message
25 // describing the error.
26 virtual void OnPACScriptError(int line_number
, const string16
& error
) = 0;
29 DISALLOW_COPY_AND_ASSIGN(ProxyResolverErrorObserver
);
34 #endif // NET_PROXY_PROXY_RESOLVER_ERROR_OBSERVER_H_