OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // ResourceHandler implementation. | 47 // ResourceHandler implementation. |
48 void OnRequestRedirected( | 48 void OnRequestRedirected( |
49 const net::RedirectInfo& redirect_info, | 49 const net::RedirectInfo& redirect_info, |
50 ResourceResponse* response, | 50 ResourceResponse* response, |
51 std::unique_ptr<ResourceController> controller) override; | 51 std::unique_ptr<ResourceController> controller) override; |
52 void OnResponseStarted( | 52 void OnResponseStarted( |
53 ResourceResponse* response, | 53 ResourceResponse* response, |
54 std::unique_ptr<ResourceController> controller) override; | 54 std::unique_ptr<ResourceController> controller) override; |
55 void OnWillStart(const GURL& url, | 55 void OnWillStart(const GURL& url, |
56 std::unique_ptr<ResourceController> controller) override; | 56 std::unique_ptr<ResourceController> controller) override; |
57 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 57 void OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
58 int* buf_size) override; | 58 int* buf_size, |
| 59 std::unique_ptr<ResourceController> controller) override; |
59 void OnReadCompleted(int bytes_read, | 60 void OnReadCompleted(int bytes_read, |
60 std::unique_ptr<ResourceController> controller) override; | 61 std::unique_ptr<ResourceController> controller) override; |
61 void OnResponseCompleted( | 62 void OnResponseCompleted( |
62 const net::URLRequestStatus& status, | 63 const net::URLRequestStatus& status, |
63 std::unique_ptr<ResourceController> controller) override; | 64 std::unique_ptr<ResourceController> controller) override; |
64 void OnDataDownloaded(int bytes_downloaded) override; | 65 void OnDataDownloaded(int bytes_downloaded) override; |
65 | 66 |
66 private: | 67 private: |
67 // Clears |core_| and its reference to the resource handler. After calling | 68 // Clears |core_| and its reference to the resource handler. After calling |
68 // this, the lifetime of the request is no longer tied to |core_|. | 69 // this, the lifetime of the request is no longer tied to |core_|. |
69 void DetachFromCore(); | 70 void DetachFromCore(); |
70 | 71 |
71 NavigationURLLoaderImplCore* core_; | 72 NavigationURLLoaderImplCore* core_; |
72 StreamWriter writer_; | 73 StreamWriter writer_; |
73 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; | 74 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; |
74 | 75 |
75 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); | 76 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); |
76 }; | 77 }; |
77 | 78 |
78 } // namespace content | 79 } // namespace content |
79 | 80 |
80 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 81 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
OLD | NEW |