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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 public: | 71 public: |
72 // |navigation_start| comes from the DidStartProvisionalLoad IPC, which tracks | 72 // |navigation_start| comes from the DidStartProvisionalLoad IPC, which tracks |
73 // both renderer-initiated and browser-initiated navigation start. | 73 // both renderer-initiated and browser-initiated navigation start. |
74 // PlzNavigate: This value always comes from the CommonNavigationParams | 74 // PlzNavigate: This value always comes from the CommonNavigationParams |
75 // associated with this navigation. | 75 // associated with this navigation. |
76 static std::unique_ptr<NavigationHandleImpl> Create( | 76 static std::unique_ptr<NavigationHandleImpl> Create( |
77 const GURL& url, | 77 const GURL& url, |
78 FrameTreeNode* frame_tree_node, | 78 FrameTreeNode* frame_tree_node, |
79 bool is_renderer_initiated, | 79 bool is_renderer_initiated, |
80 bool is_same_page, | 80 bool is_same_page, |
81 bool is_srcdoc, | |
82 const base::TimeTicks& navigation_start, | 81 const base::TimeTicks& navigation_start, |
83 int pending_nav_entry_id, | 82 int pending_nav_entry_id, |
84 bool started_from_context_menu); | 83 bool started_from_context_menu); |
85 ~NavigationHandleImpl() override; | 84 ~NavigationHandleImpl() override; |
86 | 85 |
87 // NavigationHandle implementation: | 86 // NavigationHandle implementation: |
88 const GURL& GetURL() override; | 87 const GURL& GetURL() override; |
89 SiteInstance* GetStartingSiteInstance() override; | 88 SiteInstance* GetStartingSiteInstance() override; |
90 bool IsInMainFrame() override; | 89 bool IsInMainFrame() override; |
91 bool IsParentMainFrame() override; | 90 bool IsParentMainFrame() override; |
92 bool IsRendererInitiated() override; | 91 bool IsRendererInitiated() override; |
93 bool IsSrcdoc() override; | |
94 bool WasServerRedirect() override; | 92 bool WasServerRedirect() override; |
95 int GetFrameTreeNodeId() override; | 93 int GetFrameTreeNodeId() override; |
96 int GetParentFrameTreeNodeId() override; | 94 int GetParentFrameTreeNodeId() override; |
97 const base::TimeTicks& NavigationStart() override; | 95 const base::TimeTicks& NavigationStart() override; |
98 bool IsPost() override; | 96 bool IsPost() override; |
99 const Referrer& GetReferrer() override; | 97 const Referrer& GetReferrer() override; |
100 bool HasUserGesture() override; | 98 bool HasUserGesture() override; |
101 ui::PageTransition GetPageTransition() override; | 99 ui::PageTransition GetPageTransition() override; |
102 bool IsExternalProtocol() override; | 100 bool IsExternalProtocol() override; |
103 net::Error GetNetErrorCode() override; | 101 net::Error GetNetErrorCode() override; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 DEFERRING_RESPONSE, | 301 DEFERRING_RESPONSE, |
304 READY_TO_COMMIT, | 302 READY_TO_COMMIT, |
305 DID_COMMIT, | 303 DID_COMMIT, |
306 DID_COMMIT_ERROR_PAGE, | 304 DID_COMMIT_ERROR_PAGE, |
307 }; | 305 }; |
308 | 306 |
309 NavigationHandleImpl(const GURL& url, | 307 NavigationHandleImpl(const GURL& url, |
310 FrameTreeNode* frame_tree_node, | 308 FrameTreeNode* frame_tree_node, |
311 bool is_renderer_initiated, | 309 bool is_renderer_initiated, |
312 bool is_same_page, | 310 bool is_same_page, |
313 bool is_srcdoc, | |
314 const base::TimeTicks& navigation_start, | 311 const base::TimeTicks& navigation_start, |
315 int pending_nav_entry_id, | 312 int pending_nav_entry_id, |
316 bool started_from_context_menu); | 313 bool started_from_context_menu); |
317 | 314 |
318 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); | 315 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); |
319 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); | 316 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); |
320 NavigationThrottle::ThrottleCheckResult CheckWillProcessResponse(); | 317 NavigationThrottle::ThrottleCheckResult CheckWillProcessResponse(); |
321 | 318 |
322 // Called when WillProcessResponse checks are done, to find the final | 319 // Called when WillProcessResponse checks are done, to find the final |
323 // RenderFrameHost for the navigation. Checks whether the navigation should be | 320 // RenderFrameHost for the navigation. Checks whether the navigation should be |
(...skipping 22 matching lines...) Expand all Loading... |
346 GURL url_; | 343 GURL url_; |
347 scoped_refptr<SiteInstance> starting_site_instance_; | 344 scoped_refptr<SiteInstance> starting_site_instance_; |
348 Referrer sanitized_referrer_; | 345 Referrer sanitized_referrer_; |
349 bool has_user_gesture_; | 346 bool has_user_gesture_; |
350 ui::PageTransition transition_; | 347 ui::PageTransition transition_; |
351 bool is_external_protocol_; | 348 bool is_external_protocol_; |
352 net::Error net_error_code_; | 349 net::Error net_error_code_; |
353 RenderFrameHostImpl* render_frame_host_; | 350 RenderFrameHostImpl* render_frame_host_; |
354 const bool is_renderer_initiated_; | 351 const bool is_renderer_initiated_; |
355 const bool is_same_page_; | 352 const bool is_same_page_; |
356 const bool is_srcdoc_; | |
357 bool was_redirected_; | 353 bool was_redirected_; |
358 scoped_refptr<net::HttpResponseHeaders> response_headers_; | 354 scoped_refptr<net::HttpResponseHeaders> response_headers_; |
359 net::HttpResponseInfo::ConnectionInfo connection_info_; | 355 net::HttpResponseInfo::ConnectionInfo connection_info_; |
360 | 356 |
361 // The original url of the navigation. This may differ from |url_| if the | 357 // The original url of the navigation. This may differ from |url_| if the |
362 // navigation encounters redirects. | 358 // navigation encounters redirects. |
363 const GURL original_url_; | 359 const GURL original_url_; |
364 | 360 |
365 // The HTTP method used for the navigation. | 361 // The HTTP method used for the navigation. |
366 std::string method_; | 362 std::string method_; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 std::string searchable_form_encoding_; | 431 std::string searchable_form_encoding_; |
436 | 432 |
437 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 433 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
438 | 434 |
439 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 435 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
440 }; | 436 }; |
441 | 437 |
442 } // namespace content | 438 } // namespace content |
443 | 439 |
444 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 440 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
OLD | NEW |