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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
58 int* buf_size, | 58 int* buf_size) override; |
59 int min_size) override; | |
60 void OnReadCompleted(int bytes_read, | 59 void OnReadCompleted(int bytes_read, |
61 std::unique_ptr<ResourceController> controller) override; | 60 std::unique_ptr<ResourceController> controller) override; |
62 void OnResponseCompleted( | 61 void OnResponseCompleted( |
63 const net::URLRequestStatus& status, | 62 const net::URLRequestStatus& status, |
64 std::unique_ptr<ResourceController> controller) override; | 63 std::unique_ptr<ResourceController> controller) override; |
65 void OnDataDownloaded(int bytes_downloaded) override; | 64 void OnDataDownloaded(int bytes_downloaded) override; |
66 | 65 |
67 private: | 66 private: |
68 // Clears |core_| and its reference to the resource handler. After calling | 67 // Clears |core_| and its reference to the resource handler. After calling |
69 // this, the lifetime of the request is no longer tied to |core_|. | 68 // this, the lifetime of the request is no longer tied to |core_|. |
70 void DetachFromCore(); | 69 void DetachFromCore(); |
71 | 70 |
72 NavigationURLLoaderImplCore* core_; | 71 NavigationURLLoaderImplCore* core_; |
73 StreamWriter writer_; | 72 StreamWriter writer_; |
74 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; | 73 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; |
75 | 74 |
76 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); | 75 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); |
77 }; | 76 }; |
78 | 77 |
79 } // namespace content | 78 } // namespace content |
80 | 79 |
81 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 80 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
OLD | NEW |