Roll src/third_party/skia a6ae14e:85693c1
[chromium-blink-merge.git] / ios / web / shell / shell_network_delegate.h
blob340a8cad1ba4bedd1df0b8439f7a4b200f502f5b
1 // Copyright 2014 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 IOS_WEB_SHELL_SHELL_NETWORK_DELEGATE_H_
6 #define IOS_WEB_SHELL_SHELL_NETWORK_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "net/base/network_delegate_impl.h"
12 namespace web {
14 class ShellNetworkDelegate : public net::NetworkDelegateImpl {
15 public:
16 ShellNetworkDelegate();
17 ~ShellNetworkDelegate() override;
19 private:
20 // net::NetworkDelegate implementation.
21 int OnBeforeURLRequest(net::URLRequest* request,
22 const net::CompletionCallback& callback,
23 GURL* new_url) override;
24 int OnBeforeSendHeaders(net::URLRequest* request,
25 const net::CompletionCallback& callback,
26 net::HttpRequestHeaders* headers) override;
27 void OnSendHeaders(net::URLRequest* request,
28 const net::HttpRequestHeaders& headers) override;
29 int OnHeadersReceived(
30 net::URLRequest* request,
31 const net::CompletionCallback& callback,
32 const net::HttpResponseHeaders* original_response_headers,
33 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
34 GURL* allowed_unsafe_redirect_url) override;
35 void OnBeforeRedirect(net::URLRequest* request,
36 const GURL& new_location) override;
37 void OnResponseStarted(net::URLRequest* request) override;
38 void OnRawBytesRead(const net::URLRequest& request, int bytes_read) override;
39 void OnCompleted(net::URLRequest* request, bool started) override;
40 void OnURLRequestDestroyed(net::URLRequest* request) override;
41 void OnPACScriptError(int line_number, const base::string16& error) override;
42 AuthRequiredResponse OnAuthRequired(
43 net::URLRequest* request,
44 const net::AuthChallengeInfo& auth_info,
45 const AuthCallback& callback,
46 net::AuthCredentials* credentials) override;
47 bool OnCanGetCookies(const net::URLRequest& request,
48 const net::CookieList& cookie_list) override;
49 bool OnCanSetCookie(const net::URLRequest& request,
50 const std::string& cookie_line,
51 net::CookieOptions* options) override;
52 bool OnCanAccessFile(const net::URLRequest& request,
53 const base::FilePath& path) const override;
55 DISALLOW_COPY_AND_ASSIGN(ShellNetworkDelegate);
58 } // namespace web
60 #endif // IOS_WEB_SHELL_SHELL_NETWORK_DELEGATE_H_