| 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" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
| 14 #include "content/browser/frame_host/frame_tree_node.h" |
| 14 #include "content/browser/frame_host/render_frame_host_impl.h" | 15 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 16 #include "content/public/browser/navigation_throttle.h" | 17 #include "content/public/browser/navigation_throttle.h" |
| 17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 class NavigatorDelegate; | 22 class NavigatorDelegate; |
| 22 class ServiceWorkerNavigationHandle; | 23 class ServiceWorkerNavigationHandle; |
| 23 struct NavigationRequestInfo; | 24 struct NavigationRequestInfo; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // |callback| will be called when all throttles check have completed. This | 148 // |callback| will be called when all throttles check have completed. This |
| 148 // will allow the caller to cancel the navigation or let it proceed. | 149 // will allow the caller to cancel the navigation or let it proceed. |
| 149 void WillRedirectRequest( | 150 void WillRedirectRequest( |
| 150 const GURL& new_url, | 151 const GURL& new_url, |
| 151 bool new_method_is_post, | 152 bool new_method_is_post, |
| 152 const GURL& new_referrer_url, | 153 const GURL& new_referrer_url, |
| 153 bool new_is_external_protocol, | 154 bool new_is_external_protocol, |
| 154 scoped_refptr<net::HttpResponseHeaders> response_headers, | 155 scoped_refptr<net::HttpResponseHeaders> response_headers, |
| 155 const ThrottleChecksFinishedCallback& callback); | 156 const ThrottleChecksFinishedCallback& callback); |
| 156 | 157 |
| 158 // Returns the FrameTreeNode this navigation is happening in. |
| 159 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } |
| 160 |
| 157 // Called when the navigation was redirected. This will update the |url_| and | 161 // Called when the navigation was redirected. This will update the |url_| and |
| 158 // inform the delegate. | 162 // inform the delegate. |
| 159 void DidRedirectNavigation(const GURL& new_url); | 163 void DidRedirectNavigation(const GURL& new_url); |
| 160 | 164 |
| 161 // Called when the navigation is ready to be committed in | 165 // Called when the navigation is ready to be committed in |
| 162 // |render_frame_host|. This will update the |state_| and inform the | 166 // |render_frame_host|. This will update the |state_| and inform the |
| 163 // delegate. | 167 // delegate. |
| 164 void ReadyToCommitNavigation( | 168 void ReadyToCommitNavigation( |
| 165 RenderFrameHostImpl* render_frame_host, | 169 RenderFrameHostImpl* render_frame_host, |
| 166 scoped_refptr<net::HttpResponseHeaders> response_headers); | 170 scoped_refptr<net::HttpResponseHeaders> response_headers); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a | 242 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a |
| 239 // corresponding ServiceWorkerNetworkProvider is created in the renderer. | 243 // corresponding ServiceWorkerNetworkProvider is created in the renderer. |
| 240 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; | 244 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; |
| 241 | 245 |
| 242 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 246 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 243 }; | 247 }; |
| 244 | 248 |
| 245 } // namespace content | 249 } // namespace content |
| 246 | 250 |
| 247 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 251 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |