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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 27 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 class NavigationUIData; | 31 class NavigationUIData; |
32 class NavigatorDelegate; | 32 class NavigatorDelegate; |
33 class ResourceRequestBodyImpl; | 33 class ResourceRequestBodyImpl; |
34 class ServiceWorkerContextWrapper; | 34 class ServiceWorkerContextWrapper; |
35 class ServiceWorkerNavigationHandle; | 35 class ServiceWorkerNavigationHandle; |
36 class SiteInstance; | |
37 | 36 |
38 // This class keeps track of a single navigation. It is created upon receipt of | 37 // This class keeps track of a single navigation. It is created upon receipt of |
39 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns | 38 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns |
40 // the newly created NavigationHandleImpl as long as the navigation is ongoing. | 39 // the newly created NavigationHandleImpl as long as the navigation is ongoing. |
41 // The NavigationHandleImpl in the RenderFrameHost will be reset when the | 40 // The NavigationHandleImpl in the RenderFrameHost will be reset when the |
42 // navigation stops, that is if one of the following events happen: | 41 // navigation stops, that is if one of the following events happen: |
43 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new | 42 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new |
44 // navigation (see below for special cases where the DidStartProvisionalLoad | 43 // navigation (see below for special cases where the DidStartProvisionalLoad |
45 // message does not indicate the start of a new navigation). | 44 // message does not indicate the start of a new navigation). |
46 // - The RenderFrameHost stops loading. | 45 // - The RenderFrameHost stops loading. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 bool is_renderer_initiated, | 79 bool is_renderer_initiated, |
81 bool is_synchronous, | 80 bool is_synchronous, |
82 bool is_srcdoc, | 81 bool is_srcdoc, |
83 const base::TimeTicks& navigation_start, | 82 const base::TimeTicks& navigation_start, |
84 int pending_nav_entry_id, | 83 int pending_nav_entry_id, |
85 bool started_from_context_menu); | 84 bool started_from_context_menu); |
86 ~NavigationHandleImpl() override; | 85 ~NavigationHandleImpl() override; |
87 | 86 |
88 // NavigationHandle implementation: | 87 // NavigationHandle implementation: |
89 const GURL& GetURL() override; | 88 const GURL& GetURL() override; |
| 89 SiteInstance* GetStartingSiteInstance() override; |
90 bool IsInMainFrame() override; | 90 bool IsInMainFrame() override; |
91 bool IsParentMainFrame() override; | 91 bool IsParentMainFrame() override; |
92 bool IsRendererInitiated() override; | 92 bool IsRendererInitiated() override; |
93 bool IsSynchronousNavigation() override; | 93 bool IsSynchronousNavigation() override; |
94 bool IsSrcdoc() override; | 94 bool IsSrcdoc() override; |
95 bool WasServerRedirect() override; | 95 bool WasServerRedirect() override; |
96 int GetFrameTreeNodeId() override; | 96 int GetFrameTreeNodeId() override; |
97 int GetParentFrameTreeNodeId() override; | 97 int GetParentFrameTreeNodeId() override; |
98 const base::TimeTicks& NavigationStart() override; | 98 const base::TimeTicks& NavigationStart() override; |
99 bool IsPost() override; | 99 bool IsPost() override; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result); | 328 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result); |
329 | 329 |
330 // Used in tests. | 330 // Used in tests. |
331 State state() const { return state_; } | 331 State state() const { return state_; } |
332 | 332 |
333 // Populates |throttles_| with the throttles for this navigation. | 333 // Populates |throttles_| with the throttles for this navigation. |
334 void RegisterNavigationThrottles(); | 334 void RegisterNavigationThrottles(); |
335 | 335 |
336 // See NavigationHandle for a description of those member variables. | 336 // See NavigationHandle for a description of those member variables. |
337 GURL url_; | 337 GURL url_; |
| 338 scoped_refptr<SiteInstance> starting_site_instance_; |
338 Referrer sanitized_referrer_; | 339 Referrer sanitized_referrer_; |
339 bool has_user_gesture_; | 340 bool has_user_gesture_; |
340 ui::PageTransition transition_; | 341 ui::PageTransition transition_; |
341 bool is_external_protocol_; | 342 bool is_external_protocol_; |
342 net::Error net_error_code_; | 343 net::Error net_error_code_; |
343 RenderFrameHostImpl* render_frame_host_; | 344 RenderFrameHostImpl* render_frame_host_; |
344 const bool is_renderer_initiated_; | 345 const bool is_renderer_initiated_; |
345 bool is_same_page_; | 346 bool is_same_page_; |
346 const bool is_synchronous_; | 347 const bool is_synchronous_; |
347 const bool is_srcdoc_; | 348 const bool is_srcdoc_; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 bool started_from_context_menu_; | 423 bool started_from_context_menu_; |
423 | 424 |
424 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 425 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
425 | 426 |
426 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 427 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
427 }; | 428 }; |
428 | 429 |
429 } // namespace content | 430 } // namespace content |
430 | 431 |
431 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 432 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
OLD | NEW |