OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
| 10 #include "base/memory/ref_counted.h" |
10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
11 #include "content/public/browser/navigation_throttle.h" | 12 #include "content/public/browser/navigation_throttle.h" |
12 #include "content/public/common/referrer.h" | 13 #include "content/public/common/referrer.h" |
13 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
14 #include "ui/base/page_transition_types.h" | 15 #include "ui/base/page_transition_types.h" |
15 | 16 |
16 class GURL; | 17 class GURL; |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 class HttpResponseHeaders; | 20 class HttpResponseHeaders; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 198 |
198 // Simulates the network request being redirected. | 199 // Simulates the network request being redirected. |
199 virtual NavigationThrottle::ThrottleCheckResult | 200 virtual NavigationThrottle::ThrottleCheckResult |
200 CallWillRedirectRequestForTesting(const GURL& new_url, | 201 CallWillRedirectRequestForTesting(const GURL& new_url, |
201 bool new_method_is_post, | 202 bool new_method_is_post, |
202 const GURL& new_referrer_url, | 203 const GURL& new_referrer_url, |
203 bool new_is_external_protocol) = 0; | 204 bool new_is_external_protocol) = 0; |
204 | 205 |
205 // Simulates the reception of the network response. | 206 // Simulates the reception of the network response. |
206 virtual NavigationThrottle::ThrottleCheckResult | 207 virtual NavigationThrottle::ThrottleCheckResult |
207 CallWillProcessResponseForTesting(RenderFrameHost* render_frame_host) = 0; | 208 CallWillProcessResponseForTesting( |
| 209 RenderFrameHost* render_frame_host, |
| 210 scoped_refptr<net::HttpResponseHeaders> response_headers) = 0; |
| 211 |
| 212 // Simulates the navigation being committed. |
| 213 virtual void CallDidCommitNavigationForTesting(const GURL& url) = 0; |
208 | 214 |
209 // The NavigationData that the embedder returned from | 215 // The NavigationData that the embedder returned from |
210 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 216 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
211 // be a clone of the NavigationData. | 217 // be a clone of the NavigationData. |
212 virtual NavigationData* GetNavigationData() = 0; | 218 virtual NavigationData* GetNavigationData() = 0; |
213 }; | 219 }; |
214 | 220 |
215 } // namespace content | 221 } // namespace content |
216 | 222 |
217 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 223 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |