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