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_FRAME_HOST_NAVIGATION_REQUEST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // NavigationURLLoaderDelegate implementation. | 172 // NavigationURLLoaderDelegate implementation. |
173 void OnRequestRedirected( | 173 void OnRequestRedirected( |
174 const net::RedirectInfo& redirect_info, | 174 const net::RedirectInfo& redirect_info, |
175 const scoped_refptr<ResourceResponse>& response) override; | 175 const scoped_refptr<ResourceResponse>& response) override; |
176 void OnResponseStarted( | 176 void OnResponseStarted( |
177 const scoped_refptr<ResourceResponse>& response, | 177 const scoped_refptr<ResourceResponse>& response, |
178 std::unique_ptr<StreamHandle> body, | 178 std::unique_ptr<StreamHandle> body, |
179 std::unique_ptr<NavigationData> navigation_data) override; | 179 std::unique_ptr<NavigationData> navigation_data) override; |
180 void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) override; | 180 void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) override; |
181 void OnRequestStarted(base::TimeTicks timestamp) override; | 181 void OnRequestStarted(base::TimeTicks timestamp) override; |
| 182 void OnServiceWorkerEncountered() override; |
182 | 183 |
183 // Called when the NavigationThrottles have been checked by the | 184 // Called when the NavigationThrottles have been checked by the |
184 // NavigationHandle. | 185 // NavigationHandle. |
185 void OnStartChecksComplete(NavigationThrottle::ThrottleCheckResult result); | 186 void OnStartChecksComplete(NavigationThrottle::ThrottleCheckResult result); |
186 void OnRedirectChecksComplete(NavigationThrottle::ThrottleCheckResult result); | 187 void OnRedirectChecksComplete(NavigationThrottle::ThrottleCheckResult result); |
187 void OnWillProcessResponseChecksComplete( | 188 void OnWillProcessResponseChecksComplete( |
188 NavigationThrottle::ThrottleCheckResult result); | 189 NavigationThrottle::ThrottleCheckResult result); |
189 | 190 |
190 // Have a RenderFrameHost commit the navigation. The NavigationRequest will | 191 // Have a RenderFrameHost commit the navigation. The NavigationRequest will |
191 // be destroyed after this call. | 192 // be destroyed after this call. |
192 void CommitNavigation(); | 193 void CommitNavigation(); |
193 | 194 |
194 // Called when the navigation is about to be sent to the IO thread. | |
195 void InitializeServiceWorkerHandleIfNeeded(); | |
196 | |
197 FrameTreeNode* frame_tree_node_; | 195 FrameTreeNode* frame_tree_node_; |
198 | 196 |
199 // Initialized on creation of the NavigationRequest. Sent to the renderer when | 197 // Initialized on creation of the NavigationRequest. Sent to the renderer when |
200 // the navigation is ready to commit. | 198 // the navigation is ready to commit. |
201 // Note: When the navigation is ready to commit, the url in |common_params| | 199 // Note: When the navigation is ready to commit, the url in |common_params| |
202 // will be set to the final navigation url, obtained after following all | 200 // will be set to the final navigation url, obtained after following all |
203 // redirects. | 201 // redirects. |
204 // Note: |common_params_| and |begin_params_| are not const as they can be | 202 // Note: |common_params_| and |begin_params_| are not const as they can be |
205 // modified during redirects. | 203 // modified during redirects. |
206 // Note: |request_params_| is not const because service_worker_provider_id | 204 // Note: |request_params_| is not const because service_worker_provider_id |
(...skipping 30 matching lines...) Expand all Loading... |
237 // the WillProcessResponse checks are performed by the NavigationHandle. | 235 // the WillProcessResponse checks are performed by the NavigationHandle. |
238 scoped_refptr<ResourceResponse> response_; | 236 scoped_refptr<ResourceResponse> response_; |
239 std::unique_ptr<StreamHandle> body_; | 237 std::unique_ptr<StreamHandle> body_; |
240 | 238 |
241 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); | 239 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
242 }; | 240 }; |
243 | 241 |
244 } // namespace content | 242 } // namespace content |
245 | 243 |
246 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 244 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
OLD | NEW |