Chromium Code Reviews| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 // transferring navigations. The other causes of NavigationHandleImpl reset in | 69 // transferring navigations. The other causes of NavigationHandleImpl reset in |
| 70 // the RenderFrameHost still apply. | 70 // the RenderFrameHost still apply. |
| 71 class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { | 71 class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
| 72 public: | 72 public: |
| 73 // |navigation_start| comes from the DidStartProvisionalLoad IPC, which tracks | 73 // |navigation_start| comes from the DidStartProvisionalLoad IPC, which tracks |
| 74 // both renderer-initiated and browser-initiated navigation start. | 74 // both renderer-initiated and browser-initiated navigation start. |
| 75 // PlzNavigate: This value always comes from the CommonNavigationParams | 75 // PlzNavigate: This value always comes from the CommonNavigationParams |
| 76 // associated with this navigation. | 76 // associated with this navigation. |
| 77 static std::unique_ptr<NavigationHandleImpl> Create( | 77 static std::unique_ptr<NavigationHandleImpl> Create( |
| 78 const GURL& url, | 78 const GURL& url, |
| 79 const GURL& site_url, | |
| 79 FrameTreeNode* frame_tree_node, | 80 FrameTreeNode* frame_tree_node, |
| 80 bool is_renderer_initiated, | 81 bool is_renderer_initiated, |
| 81 bool is_synchronous, | 82 bool is_synchronous, |
| 82 bool is_srcdoc, | 83 bool is_srcdoc, |
| 83 const base::TimeTicks& navigation_start, | 84 const base::TimeTicks& navigation_start, |
| 84 int pending_nav_entry_id, | 85 int pending_nav_entry_id, |
| 85 bool started_from_context_menu); | 86 bool started_from_context_menu); |
| 86 ~NavigationHandleImpl() override; | 87 ~NavigationHandleImpl() override; |
| 87 | 88 |
| 88 // NavigationHandle implementation: | 89 // NavigationHandle implementation: |
| 89 const GURL& GetURL() override; | 90 const GURL& GetURL() override; |
| 91 const GURL& GetSiteURL() override; | |
| 90 bool IsInMainFrame() override; | 92 bool IsInMainFrame() override; |
| 91 bool IsParentMainFrame() override; | 93 bool IsParentMainFrame() override; |
| 92 bool IsRendererInitiated() override; | 94 bool IsRendererInitiated() override; |
| 93 bool IsSynchronousNavigation() override; | 95 bool IsSynchronousNavigation() override; |
| 94 bool IsSrcdoc() override; | 96 bool IsSrcdoc() override; |
| 95 bool WasServerRedirect() override; | 97 bool WasServerRedirect() override; |
| 96 int GetFrameTreeNodeId() override; | 98 int GetFrameTreeNodeId() override; |
| 97 int GetParentFrameTreeNodeId() override; | 99 int GetParentFrameTreeNodeId() override; |
| 98 const base::TimeTicks& NavigationStart() override; | 100 const base::TimeTicks& NavigationStart() override; |
| 99 bool IsPost() override; | 101 bool IsPost() override; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 291 DEFERRING_REDIRECT, | 293 DEFERRING_REDIRECT, |
| 292 CANCELING, | 294 CANCELING, |
| 293 WILL_PROCESS_RESPONSE, | 295 WILL_PROCESS_RESPONSE, |
| 294 DEFERRING_RESPONSE, | 296 DEFERRING_RESPONSE, |
| 295 READY_TO_COMMIT, | 297 READY_TO_COMMIT, |
| 296 DID_COMMIT, | 298 DID_COMMIT, |
| 297 DID_COMMIT_ERROR_PAGE, | 299 DID_COMMIT_ERROR_PAGE, |
| 298 }; | 300 }; |
| 299 | 301 |
| 300 NavigationHandleImpl(const GURL& url, | 302 NavigationHandleImpl(const GURL& url, |
| 303 const GURL& site_url, | |
| 301 FrameTreeNode* frame_tree_node, | 304 FrameTreeNode* frame_tree_node, |
| 302 bool is_renderer_initiated, | 305 bool is_renderer_initiated, |
| 303 bool is_synchronous, | 306 bool is_synchronous, |
| 304 bool is_srcdoc, | 307 bool is_srcdoc, |
| 305 const base::TimeTicks& navigation_start, | 308 const base::TimeTicks& navigation_start, |
| 306 int pending_nav_entry_id, | 309 int pending_nav_entry_id, |
| 307 bool started_from_context_menu); | 310 bool started_from_context_menu); |
| 308 | 311 |
| 309 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); | 312 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); |
| 310 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); | 313 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 328 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result); | 331 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result); |
| 329 | 332 |
| 330 // Used in tests. | 333 // Used in tests. |
| 331 State state() const { return state_; } | 334 State state() const { return state_; } |
| 332 | 335 |
| 333 // Populates |throttles_| with the throttles for this navigation. | 336 // Populates |throttles_| with the throttles for this navigation. |
| 334 void RegisterNavigationThrottles(); | 337 void RegisterNavigationThrottles(); |
| 335 | 338 |
| 336 // See NavigationHandle for a description of those member variables. | 339 // See NavigationHandle for a description of those member variables. |
| 337 GURL url_; | 340 GURL url_; |
| 341 GURL site_url_; | |
|
nasko
2016/10/12 17:00:35
Let's store the SiteInstance here instead of the U
jam
2016/10/12 22:10:45
Done.
| |
| 338 Referrer sanitized_referrer_; | 342 Referrer sanitized_referrer_; |
| 339 bool has_user_gesture_; | 343 bool has_user_gesture_; |
| 340 ui::PageTransition transition_; | 344 ui::PageTransition transition_; |
| 341 bool is_external_protocol_; | 345 bool is_external_protocol_; |
| 342 net::Error net_error_code_; | 346 net::Error net_error_code_; |
| 343 RenderFrameHostImpl* render_frame_host_; | 347 RenderFrameHostImpl* render_frame_host_; |
| 344 const bool is_renderer_initiated_; | 348 const bool is_renderer_initiated_; |
| 345 bool is_same_page_; | 349 bool is_same_page_; |
| 346 const bool is_synchronous_; | 350 const bool is_synchronous_; |
| 347 const bool is_srcdoc_; | 351 const bool is_srcdoc_; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 bool started_from_context_menu_; | 426 bool started_from_context_menu_; |
| 423 | 427 |
| 424 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 428 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
| 425 | 429 |
| 426 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 430 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 427 }; | 431 }; |
| 428 | 432 |
| 429 } // namespace content | 433 } // namespace content |
| 430 | 434 |
| 431 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 435 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |