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_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/public/browser/navigation_throttle.h" | 11 #include "content/public/browser/navigation_throttle.h" |
| 12 #include "content/public/common/referrer.h" | 12 #include "content/public/common/referrer.h" |
| 13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 14 #include "ui/base/page_transition_types.h" | 14 #include "ui/base/page_transition_types.h" |
| 15 | 15 |
| 16 class GURL; | 16 class GURL; |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class NavigationData; | |
| 19 class NavigationThrottle; | 20 class NavigationThrottle; |
| 20 class RenderFrameHost; | 21 class RenderFrameHost; |
| 21 class WebContents; | 22 class WebContents; |
| 22 | 23 |
| 23 // A NavigationHandle tracks information related to a single navigation. | 24 // A NavigationHandle tracks information related to a single navigation. |
| 24 // NavigationHandles are provided to several WebContentsObserver methods to | 25 // NavigationHandles are provided to several WebContentsObserver methods to |
| 25 // allow observers to track specific navigations. Observers should clear any | 26 // allow observers to track specific navigations. Observers should clear any |
| 26 // references to a NavigationHandle at the time of | 27 // references to a NavigationHandle at the time of |
| 27 // WebContentsObserver::DidFinishNavigation, just before the handle is | 28 // WebContentsObserver::DidFinishNavigation, just before the handle is |
| 28 // destroyed. | 29 // destroyed. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 bool has_user_gesture, | 162 bool has_user_gesture, |
| 162 ui::PageTransition transition, | 163 ui::PageTransition transition, |
| 163 bool is_external_protocol) = 0; | 164 bool is_external_protocol) = 0; |
| 164 | 165 |
| 165 // Simulates the network request being redirected. | 166 // Simulates the network request being redirected. |
| 166 virtual NavigationThrottle::ThrottleCheckResult | 167 virtual NavigationThrottle::ThrottleCheckResult |
| 167 CallWillRedirectRequestForTesting(const GURL& new_url, | 168 CallWillRedirectRequestForTesting(const GURL& new_url, |
| 168 bool new_method_is_post, | 169 bool new_method_is_post, |
| 169 const GURL& new_referrer_url, | 170 const GURL& new_referrer_url, |
| 170 bool new_is_external_protocol) = 0; | 171 bool new_is_external_protocol) = 0; |
| 172 | |
| 173 // The NavigationData that the embedder returned from | |
| 174 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | |
| 175 // be a clone of the NavigationData. | |
| 176 virtual NavigationData* GetNavigationData() = 0; | |
|
mmenke
2016/05/06 18:59:36
Again, should this return a const object (And be c
RyanSturm
2016/05/06 20:55:44
Done.
| |
| 171 }; | 177 }; |
| 172 | 178 |
| 173 } // namespace content | 179 } // namespace content |
| 174 | 180 |
| 175 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 181 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |