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_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
7 | 7 |
8 #include "content/public/browser/navigation_handle.h" | 8 #include "content/public/browser/navigation_handle.h" |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 RenderFrameHostImpl* render_frame_host, | 199 RenderFrameHostImpl* render_frame_host, |
200 scoped_refptr<net::HttpResponseHeaders> response_headers); | 200 scoped_refptr<net::HttpResponseHeaders> response_headers); |
201 | 201 |
202 // Called when the navigation was committed in |render_frame_host|. This will | 202 // Called when the navigation was committed in |render_frame_host|. This will |
203 // update the |state_|. | 203 // update the |state_|. |
204 void DidCommitNavigation( | 204 void DidCommitNavigation( |
205 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, | 205 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, |
206 bool same_page, | 206 bool same_page, |
207 RenderFrameHostImpl* render_frame_host); | 207 RenderFrameHostImpl* render_frame_host); |
208 | 208 |
| 209 // TODO(clamy): Remove this once enough data has been gathered for |
| 210 // crbug.com/589365. |
| 211 void set_is_in_commit(bool is_in_commit) { is_in_commit_ = is_in_commit; } |
| 212 |
209 private: | 213 private: |
210 friend class NavigationHandleImplTest; | 214 friend class NavigationHandleImplTest; |
211 | 215 |
212 // Used to track the state the navigation is currently in. | 216 // Used to track the state the navigation is currently in. |
213 enum State { | 217 enum State { |
214 INITIAL = 0, | 218 INITIAL = 0, |
215 WILL_SEND_REQUEST, | 219 WILL_SEND_REQUEST, |
216 DEFERRING_START, | 220 DEFERRING_START, |
217 WILL_REDIRECT_REQUEST, | 221 WILL_REDIRECT_REQUEST, |
218 DEFERRING_REDIRECT, | 222 DEFERRING_REDIRECT, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 const int pending_nav_entry_id_; | 284 const int pending_nav_entry_id_; |
281 | 285 |
282 // This callback will be run when all throttle checks have been performed. | 286 // This callback will be run when all throttle checks have been performed. |
283 ThrottleChecksFinishedCallback complete_callback_; | 287 ThrottleChecksFinishedCallback complete_callback_; |
284 | 288 |
285 // PlzNavigate | 289 // PlzNavigate |
286 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a | 290 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a |
287 // corresponding ServiceWorkerNetworkProvider is created in the renderer. | 291 // corresponding ServiceWorkerNetworkProvider is created in the renderer. |
288 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; | 292 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; |
289 | 293 |
| 294 // True if the RenderFrameHost that owns the NavigationHandle is in the |
| 295 // process of committing a navigation. This is temporary to help pinpoint |
| 296 // the cause of crbug.com/589365. |
| 297 // TODO(clamy): Remove once enough data has been gathered. |
| 298 bool is_in_commit_; |
| 299 |
290 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 300 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
291 }; | 301 }; |
292 | 302 |
293 } // namespace content | 303 } // namespace content |
294 | 304 |
295 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 305 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
OLD | NEW |