Infobar material design refresh: bg color
[chromium-blink-merge.git] / android_webview / browser / net / aw_network_delegate.h
blobd9d565c2ff64d4d1ce749a53ae47e460b169b784
1 // Copyright (c) 2012 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 ANDROID_WEBVIEW_BROWSER_NET_AW_NETWORK_DELEGATE_H_
6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_NETWORK_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "net/base/network_delegate_impl.h"
11 namespace net {
12 class ProxyInfo;
13 class URLRequest;
16 namespace android_webview {
18 // WebView's implementation of the NetworkDelegate.
19 class AwNetworkDelegate : public net::NetworkDelegateImpl {
20 public:
21 AwNetworkDelegate();
22 ~AwNetworkDelegate() override;
24 private:
25 // NetworkDelegate implementation.
26 int OnBeforeURLRequest(net::URLRequest* request,
27 const net::CompletionCallback& callback,
28 GURL* new_url) override;
29 int OnBeforeSendHeaders(net::URLRequest* request,
30 const net::CompletionCallback& callback,
31 net::HttpRequestHeaders* headers) override;
32 void OnSendHeaders(net::URLRequest* request,
33 const net::HttpRequestHeaders& headers) override;
34 int OnHeadersReceived(
35 net::URLRequest* request,
36 const net::CompletionCallback& callback,
37 const net::HttpResponseHeaders* original_response_headers,
38 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
39 GURL* allowed_unsafe_redirect_url) override;
40 void OnBeforeRedirect(net::URLRequest* request,
41 const GURL& new_location) override;
42 void OnResponseStarted(net::URLRequest* request) override;
43 void OnCompleted(net::URLRequest* request, bool started) override;
44 void OnURLRequestDestroyed(net::URLRequest* request) override;
45 void OnPACScriptError(int line_number, const base::string16& error) override;
46 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired(
47 net::URLRequest* request,
48 const net::AuthChallengeInfo& auth_info,
49 const AuthCallback& callback,
50 net::AuthCredentials* credentials) override;
51 bool OnCanGetCookies(const net::URLRequest& request,
52 const net::CookieList& cookie_list) override;
53 bool OnCanSetCookie(const net::URLRequest& request,
54 const std::string& cookie_line,
55 net::CookieOptions* options) override;
56 bool OnCanAccessFile(const net::URLRequest& request,
57 const base::FilePath& path) const override;
59 DISALLOW_COPY_AND_ASSIGN(AwNetworkDelegate);
62 } // namespace android_webview
64 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_NETWORK_DELEGATE_H_