| 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 "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // associated with this navigation. | 63 // associated with this navigation. |
| 64 static scoped_ptr<NavigationHandleImpl> Create( | 64 static scoped_ptr<NavigationHandleImpl> Create( |
| 65 const GURL& url, | 65 const GURL& url, |
| 66 FrameTreeNode* frame_tree_node, | 66 FrameTreeNode* frame_tree_node, |
| 67 const base::TimeTicks& navigation_start); | 67 const base::TimeTicks& navigation_start); |
| 68 ~NavigationHandleImpl() override; | 68 ~NavigationHandleImpl() override; |
| 69 | 69 |
| 70 // NavigationHandle implementation: | 70 // NavigationHandle implementation: |
| 71 const GURL& GetURL() override; | 71 const GURL& GetURL() override; |
| 72 bool IsInMainFrame() override; | 72 bool IsInMainFrame() override; |
| 73 const base::TimeTicks& GetNavigationStart() override; |
| 73 bool IsPost() override; | 74 bool IsPost() override; |
| 74 const Referrer& GetReferrer() override; | 75 const Referrer& GetReferrer() override; |
| 75 bool HasUserGesture() override; | 76 bool HasUserGesture() override; |
| 76 ui::PageTransition GetPageTransition() override; | 77 ui::PageTransition GetPageTransition() override; |
| 77 bool IsExternalProtocol() override; | 78 bool IsExternalProtocol() override; |
| 78 net::Error GetNetErrorCode() override; | 79 net::Error GetNetErrorCode() override; |
| 79 RenderFrameHostImpl* GetRenderFrameHost() override; | 80 RenderFrameHostImpl* GetRenderFrameHost() override; |
| 80 bool IsSamePage() override; | 81 bool IsSamePage() override; |
| 81 bool HasCommitted() override; | 82 bool HasCommitted() override; |
| 82 bool IsErrorPage() override; | 83 bool IsErrorPage() override; |
| 83 void Resume() override; | 84 void Resume() override; |
| 84 void RegisterThrottleForTesting( | 85 void RegisterThrottleForTesting( |
| 85 scoped_ptr<NavigationThrottle> navigation_throttle) override; | 86 scoped_ptr<NavigationThrottle> navigation_throttle) override; |
| 86 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting( | 87 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting( |
| 87 bool is_post, | 88 bool is_post, |
| 88 const Referrer& sanitized_referrer, | 89 const Referrer& sanitized_referrer, |
| 89 bool has_user_gesture, | 90 bool has_user_gesture, |
| 90 ui::PageTransition transition, | 91 ui::PageTransition transition, |
| 91 bool is_external_protocol) override; | 92 bool is_external_protocol) override; |
| 92 NavigationThrottle::ThrottleCheckResult CallWillRedirectRequestForTesting( | 93 NavigationThrottle::ThrottleCheckResult CallWillRedirectRequestForTesting( |
| 93 const GURL& new_url, | 94 const GURL& new_url, |
| 94 bool new_method_is_post, | 95 bool new_method_is_post, |
| 95 const GURL& new_referrer_url, | 96 const GURL& new_referrer_url, |
| 96 bool new_is_external_protocol) override; | 97 bool new_is_external_protocol) override; |
| 97 | 98 |
| 98 // The time the navigation started, recorded either in the renderer or browser | |
| 99 // process. Corresponds to Navigation Timing API Standard. | |
| 100 // TODO(csharrison) add this to the public class and mark this override. | |
| 101 const base::TimeTicks& GetNavigationStart(); | |
| 102 | |
| 103 NavigatorDelegate* GetDelegate() const; | 99 NavigatorDelegate* GetDelegate() const; |
| 104 | 100 |
| 105 void set_net_error_code(net::Error net_error_code) { | 101 void set_net_error_code(net::Error net_error_code) { |
| 106 net_error_code_ = net_error_code; | 102 net_error_code_ = net_error_code; |
| 107 } | 103 } |
| 108 | 104 |
| 109 // Returns whether the navigation is currently being transferred from one | 105 // Returns whether the navigation is currently being transferred from one |
| 110 // RenderFrameHost to another. In particular, a DidStartProvisionalLoad IPC | 106 // RenderFrameHost to another. In particular, a DidStartProvisionalLoad IPC |
| 111 // for the navigation URL, received in the new RenderFrameHost, should not | 107 // for the navigation URL, received in the new RenderFrameHost, should not |
| 112 // indicate the start of a new navigation in that case. | 108 // indicate the start of a new navigation in that case. |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a | 214 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a |
| 219 // corresponding ServiceWorkerNetworkProvider is created in the renderer. | 215 // corresponding ServiceWorkerNetworkProvider is created in the renderer. |
| 220 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; | 216 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; |
| 221 | 217 |
| 222 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 218 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 223 }; | 219 }; |
| 224 | 220 |
| 225 } // namespace content | 221 } // namespace content |
| 226 | 222 |
| 227 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 223 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |