| 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> |
| 11 | 11 |
| 12 #include <memory> |
| 13 |
| 12 #include "base/callback.h" | 14 #include "base/callback.h" |
| 13 #include "base/macros.h" | 15 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
| 16 #include "content/browser/frame_host/frame_tree_node.h" | 18 #include "content/browser/frame_host/frame_tree_node.h" |
| 17 #include "content/browser/frame_host/render_frame_host_impl.h" | 19 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 18 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 19 #include "content/public/browser/navigation_data.h" | 21 #include "content/public/browser/navigation_data.h" |
| 20 #include "content/public/browser/navigation_throttle.h" | 22 #include "content/public/browser/navigation_throttle.h" |
| 21 #include "content/public/common/request_context_type.h" | 23 #include "content/public/common/request_context_type.h" |
| 22 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 23 | 25 |
| 24 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 26 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
| 25 | 27 |
| 26 namespace content { | 28 namespace content { |
| 27 | 29 |
| 30 class ClearSiteDataHeaderObserver; |
| 28 class NavigatorDelegate; | 31 class NavigatorDelegate; |
| 29 class ResourceRequestBodyImpl; | 32 class ResourceRequestBodyImpl; |
| 30 | 33 |
| 31 // This class keeps track of a single navigation. It is created upon receipt of | 34 // This class keeps track of a single navigation. It is created upon receipt of |
| 32 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns | 35 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns |
| 33 // the newly created NavigationHandleImpl as long as the navigation is ongoing. | 36 // the newly created NavigationHandleImpl as long as the navigation is ongoing. |
| 34 // The NavigationHandleImpl in the RenderFrameHost will be reset when the | 37 // The NavigationHandleImpl in the RenderFrameHost will be reset when the |
| 35 // navigation stops, that is if one of the following events happen: | 38 // navigation stops, that is if one of the following events happen: |
| 36 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new | 39 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new |
| 37 // navigation (see below for special cases where the DidStartProvisionalLoad | 40 // navigation (see below for special cases where the DidStartProvisionalLoad |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // Whether the navigation is in the middle of a transfer. Set to false when | 302 // Whether the navigation is in the middle of a transfer. Set to false when |
| 300 // the DidStartProvisionalLoad is received from the new renderer. | 303 // the DidStartProvisionalLoad is received from the new renderer. |
| 301 bool is_transferring_; | 304 bool is_transferring_; |
| 302 | 305 |
| 303 // The FrameTreeNode this navigation is happening in. | 306 // The FrameTreeNode this navigation is happening in. |
| 304 FrameTreeNode* frame_tree_node_; | 307 FrameTreeNode* frame_tree_node_; |
| 305 | 308 |
| 306 // A list of Throttles registered for this navigation. | 309 // A list of Throttles registered for this navigation. |
| 307 ScopedVector<NavigationThrottle> throttles_; | 310 ScopedVector<NavigationThrottle> throttles_; |
| 308 | 311 |
| 312 // Handler of the experiment Clear-Site-Data header. |
| 313 std::unique_ptr<ClearSiteDataHeaderObserver> clear_site_data_header_observer_; |
| 314 |
| 309 // The index of the next throttle to check. | 315 // The index of the next throttle to check. |
| 310 size_t next_index_; | 316 size_t next_index_; |
| 311 | 317 |
| 312 // The time this navigation started. | 318 // The time this navigation started. |
| 313 const base::TimeTicks navigation_start_; | 319 const base::TimeTicks navigation_start_; |
| 314 | 320 |
| 315 // The unique id of the corresponding NavigationEntry. | 321 // The unique id of the corresponding NavigationEntry. |
| 316 int pending_nav_entry_id_; | 322 int pending_nav_entry_id_; |
| 317 | 323 |
| 318 // The fetch request context type. | 324 // The fetch request context type. |
| 319 RequestContextType request_context_type_; | 325 RequestContextType request_context_type_; |
| 320 | 326 |
| 321 // This callback will be run when all throttle checks have been performed. | 327 // This callback will be run when all throttle checks have been performed. |
| 322 ThrottleChecksFinishedCallback complete_callback_; | 328 ThrottleChecksFinishedCallback complete_callback_; |
| 323 | 329 |
| 324 // Embedder data tied to this navigation. | 330 // Embedder data tied to this navigation. |
| 325 std::unique_ptr<NavigationData> navigation_data_; | 331 std::unique_ptr<NavigationData> navigation_data_; |
| 326 | 332 |
| 327 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 333 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 328 }; | 334 }; |
| 329 | 335 |
| 330 } // namespace content | 336 } // namespace content |
| 331 | 337 |
| 332 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 338 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |