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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { | 70 class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
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_synchronous, | 80 bool is_same_page, |
81 bool is_srcdoc, | 81 bool is_srcdoc, |
82 const base::TimeTicks& navigation_start, | 82 const base::TimeTicks& navigation_start, |
83 int pending_nav_entry_id, | 83 int pending_nav_entry_id, |
84 bool started_from_context_menu); | 84 bool started_from_context_menu); |
85 ~NavigationHandleImpl() override; | 85 ~NavigationHandleImpl() override; |
86 | 86 |
87 // NavigationHandle implementation: | 87 // NavigationHandle implementation: |
88 const GURL& GetURL() override; | 88 const GURL& GetURL() override; |
89 SiteInstance* GetStartingSiteInstance() 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; | |
94 bool IsSrcdoc() override; | 93 bool IsSrcdoc() override; |
95 bool WasServerRedirect() override; | 94 bool WasServerRedirect() override; |
96 int GetFrameTreeNodeId() override; | 95 int GetFrameTreeNodeId() override; |
97 int GetParentFrameTreeNodeId() override; | 96 int GetParentFrameTreeNodeId() override; |
98 const base::TimeTicks& NavigationStart() override; | 97 const base::TimeTicks& NavigationStart() override; |
99 bool IsPost() override; | 98 bool IsPost() override; |
100 const Referrer& GetReferrer() override; | 99 const Referrer& GetReferrer() override; |
101 bool HasUserGesture() override; | 100 bool HasUserGesture() override; |
102 ui::PageTransition GetPageTransition() override; | 101 ui::PageTransition GetPageTransition() override; |
103 bool IsExternalProtocol() override; | 102 bool IsExternalProtocol() override; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 WILL_PROCESS_RESPONSE, | 292 WILL_PROCESS_RESPONSE, |
294 DEFERRING_RESPONSE, | 293 DEFERRING_RESPONSE, |
295 READY_TO_COMMIT, | 294 READY_TO_COMMIT, |
296 DID_COMMIT, | 295 DID_COMMIT, |
297 DID_COMMIT_ERROR_PAGE, | 296 DID_COMMIT_ERROR_PAGE, |
298 }; | 297 }; |
299 | 298 |
300 NavigationHandleImpl(const GURL& url, | 299 NavigationHandleImpl(const GURL& url, |
301 FrameTreeNode* frame_tree_node, | 300 FrameTreeNode* frame_tree_node, |
302 bool is_renderer_initiated, | 301 bool is_renderer_initiated, |
303 bool is_synchronous, | 302 bool is_same_page, |
304 bool is_srcdoc, | 303 bool is_srcdoc, |
305 const base::TimeTicks& navigation_start, | 304 const base::TimeTicks& navigation_start, |
306 int pending_nav_entry_id, | 305 int pending_nav_entry_id, |
307 bool started_from_context_menu); | 306 bool started_from_context_menu); |
308 | 307 |
309 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); | 308 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); |
310 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); | 309 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); |
311 NavigationThrottle::ThrottleCheckResult CheckWillProcessResponse(); | 310 NavigationThrottle::ThrottleCheckResult CheckWillProcessResponse(); |
312 | 311 |
313 // Called when WillProcessResponse checks are done, to find the final | 312 // Called when WillProcessResponse checks are done, to find the final |
(...skipping 22 matching lines...) Expand all Loading... |
336 // See NavigationHandle for a description of those member variables. | 335 // See NavigationHandle for a description of those member variables. |
337 GURL url_; | 336 GURL url_; |
338 scoped_refptr<SiteInstance> starting_site_instance_; | 337 scoped_refptr<SiteInstance> starting_site_instance_; |
339 Referrer sanitized_referrer_; | 338 Referrer sanitized_referrer_; |
340 bool has_user_gesture_; | 339 bool has_user_gesture_; |
341 ui::PageTransition transition_; | 340 ui::PageTransition transition_; |
342 bool is_external_protocol_; | 341 bool is_external_protocol_; |
343 net::Error net_error_code_; | 342 net::Error net_error_code_; |
344 RenderFrameHostImpl* render_frame_host_; | 343 RenderFrameHostImpl* render_frame_host_; |
345 const bool is_renderer_initiated_; | 344 const bool is_renderer_initiated_; |
346 bool is_same_page_; | 345 const bool is_same_page_; |
347 const bool is_synchronous_; | |
348 const bool is_srcdoc_; | 346 const bool is_srcdoc_; |
349 bool was_redirected_; | 347 bool was_redirected_; |
350 scoped_refptr<net::HttpResponseHeaders> response_headers_; | 348 scoped_refptr<net::HttpResponseHeaders> response_headers_; |
351 | 349 |
352 // The original url of the navigation. This may differ from |url_| if the | 350 // The original url of the navigation. This may differ from |url_| if the |
353 // navigation encounters redirects. | 351 // navigation encounters redirects. |
354 const GURL original_url_; | 352 const GURL original_url_; |
355 | 353 |
356 // The HTTP method used for the navigation. | 354 // The HTTP method used for the navigation. |
357 std::string method_; | 355 std::string method_; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 bool started_from_context_menu_; | 421 bool started_from_context_menu_; |
424 | 422 |
425 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 423 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
426 | 424 |
427 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 425 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
428 }; | 426 }; |
429 | 427 |
430 } // namespace content | 428 } // namespace content |
431 | 429 |
432 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 430 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
OLD | NEW |