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