| 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_URL_LOADER_IMPL_CORE_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_ |
| 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "content/browser/loader/navigation_url_loader_impl.h" | 12 #include "content/browser/loader/navigation_url_loader_impl.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 class URLRequest; | 15 class URLRequest; |
| 16 struct RedirectInfo; | 16 struct RedirectInfo; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 class FrameTreeNode; | 21 class FrameTreeNode; |
| 22 class NavigationResourceHandler; | 22 class NavigationResourceHandler; |
| 23 class NavigationData; |
| 23 class ResourceContext; | 24 class ResourceContext; |
| 24 class ResourceHandler; | 25 class ResourceHandler; |
| 25 class ResourceRequestBody; | 26 class ResourceRequestBody; |
| 26 class ServiceWorkerNavigationHandleCore; | 27 class ServiceWorkerNavigationHandleCore; |
| 27 class StreamHandle; | 28 class StreamHandle; |
| 28 struct ResourceResponse; | 29 struct ResourceResponse; |
| 29 | 30 |
| 30 // The IO-thread counterpart to the NavigationURLLoaderImpl. It lives on the IO | 31 // The IO-thread counterpart to the NavigationURLLoaderImpl. It lives on the IO |
| 31 // thread and is owned by the UI-thread NavigationURLLoaderImpl. | 32 // thread and is owned by the UI-thread NavigationURLLoaderImpl. |
| 32 // NavigationURLLoaderImplCore interacts with the ResourceDispatcherHost stack | 33 // NavigationURLLoaderImplCore interacts with the ResourceDispatcherHost stack |
| (...skipping 20 matching lines...) Expand all Loading... |
| 53 void set_resource_handler(NavigationResourceHandler* resource_handler) { | 54 void set_resource_handler(NavigationResourceHandler* resource_handler) { |
| 54 resource_handler_ = resource_handler; | 55 resource_handler_ = resource_handler; |
| 55 } | 56 } |
| 56 | 57 |
| 57 // Notifies |loader_| on the UI thread that the request was redirected. | 58 // Notifies |loader_| on the UI thread that the request was redirected. |
| 58 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, | 59 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, |
| 59 ResourceResponse* response); | 60 ResourceResponse* response); |
| 60 | 61 |
| 61 // Notifies |loader_| on the UI thread that the response started. | 62 // Notifies |loader_| on the UI thread that the response started. |
| 62 void NotifyResponseStarted(ResourceResponse* response, | 63 void NotifyResponseStarted(ResourceResponse* response, |
| 63 std::unique_ptr<StreamHandle> body); | 64 std::unique_ptr<StreamHandle> body, |
| 65 NavigationData* navigation_data); |
| 64 | 66 |
| 65 // Notifies |loader_| on the UI thread that the request failed. | 67 // Notifies |loader_| on the UI thread that the request failed. |
| 66 void NotifyRequestFailed(bool in_cache, int net_error); | 68 void NotifyRequestFailed(bool in_cache, int net_error); |
| 67 | 69 |
| 68 private: | 70 private: |
| 69 base::WeakPtr<NavigationURLLoaderImpl> loader_; | 71 base::WeakPtr<NavigationURLLoaderImpl> loader_; |
| 70 NavigationResourceHandler* resource_handler_; | 72 NavigationResourceHandler* resource_handler_; |
| 71 | 73 |
| 72 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImplCore); | 74 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImplCore); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace content | 77 } // namespace content |
| 76 | 78 |
| 77 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_ | 79 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_ |
| OLD | NEW |