| 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_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/time/time.h" |
| 12 #include "content/browser/loader/navigation_url_loader.h" | 13 #include "content/browser/loader/navigation_url_loader.h" |
| 13 | 14 |
| 14 namespace net { | 15 namespace net { |
| 15 struct RedirectInfo; | 16 struct RedirectInfo; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 | 20 |
| 20 class NavigationURLLoaderImplCore; | 21 class NavigationURLLoaderImplCore; |
| 21 class StreamHandle; | 22 class StreamHandle; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, | 44 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, |
| 44 const scoped_refptr<ResourceResponse>& response); | 45 const scoped_refptr<ResourceResponse>& response); |
| 45 | 46 |
| 46 // Notifies the delegate that the response has started. | 47 // Notifies the delegate that the response has started. |
| 47 void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response, | 48 void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response, |
| 48 scoped_ptr<StreamHandle> body); | 49 scoped_ptr<StreamHandle> body); |
| 49 | 50 |
| 50 // Notifies the delegate the request failed to return a response. | 51 // Notifies the delegate the request failed to return a response. |
| 51 void NotifyRequestFailed(int net_error); | 52 void NotifyRequestFailed(int net_error); |
| 52 | 53 |
| 54 // Notifies the delegate the begin navigation request was handled and a |
| 55 // potential first network request is about to be made. |
| 56 void NavigationRequested(base::TimeTicks timestamp); |
| 57 |
| 53 NavigationURLLoaderDelegate* delegate_; | 58 NavigationURLLoaderDelegate* delegate_; |
| 54 | 59 |
| 55 // |core_| is deleted on the IO thread in a subsequent task when the | 60 // |core_| is deleted on the IO thread in a subsequent task when the |
| 56 // NavigationURLLoaderImpl goes out of scope. | 61 // NavigationURLLoaderImpl goes out of scope. |
| 57 NavigationURLLoaderImplCore* core_; | 62 NavigationURLLoaderImplCore* core_; |
| 58 | 63 |
| 59 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_; | 64 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_; |
| 60 | 65 |
| 61 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl); | 66 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl); |
| 62 }; | 67 }; |
| 63 | 68 |
| 64 } // namespace content | 69 } // namespace content |
| 65 | 70 |
| 66 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ | 71 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ |
| OLD | NEW |