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 #include <string> | 9 #include <string> |
| 10 #include <vector> |
10 | 11 |
| 12 #include "base/supports_user_data.h" |
11 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
12 #include "content/public/browser/navigation_throttle.h" | 14 #include "content/public/browser/navigation_throttle.h" |
13 #include "content/public/browser/reload_type.h" | 15 #include "content/public/browser/reload_type.h" |
14 #include "content/public/browser/restore_type.h" | 16 #include "content/public/browser/restore_type.h" |
15 #include "content/public/common/referrer.h" | 17 #include "content/public/common/referrer.h" |
16 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
17 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
18 #include "net/http/http_response_info.h" | 20 #include "net/http/http_response_info.h" |
19 #include "ui/base/page_transition_types.h" | 21 #include "ui/base/page_transition_types.h" |
20 | 22 |
(...skipping 10 matching lines...) Expand all Loading... |
31 class RenderFrameHost; | 33 class RenderFrameHost; |
32 class SiteInstance; | 34 class SiteInstance; |
33 class WebContents; | 35 class WebContents; |
34 | 36 |
35 // A NavigationHandle tracks information related to a single navigation. | 37 // A NavigationHandle tracks information related to a single navigation. |
36 // NavigationHandles are provided to several WebContentsObserver methods to | 38 // NavigationHandles are provided to several WebContentsObserver methods to |
37 // allow observers to track specific navigations. Observers should clear any | 39 // allow observers to track specific navigations. Observers should clear any |
38 // references to a NavigationHandle at the time of | 40 // references to a NavigationHandle at the time of |
39 // WebContentsObserver::DidFinishNavigation, just before the handle is | 41 // WebContentsObserver::DidFinishNavigation, just before the handle is |
40 // destroyed. | 42 // destroyed. |
41 class CONTENT_EXPORT NavigationHandle { | 43 class CONTENT_EXPORT NavigationHandle : public base::SupportsUserData { |
42 public: | 44 public: |
43 virtual ~NavigationHandle() {} | 45 ~NavigationHandle() override {} |
44 | 46 |
45 // Parameters available at navigation start time ----------------------------- | 47 // Parameters available at navigation start time ----------------------------- |
46 // | 48 // |
47 // These parameters are always available during the navigation. Note that | 49 // These parameters are always available during the navigation. Note that |
48 // some may change during navigation (e.g. due to server redirects). | 50 // some may change during navigation (e.g. due to server redirects). |
49 | 51 |
50 // The URL the frame is navigating to. This may change during the navigation | 52 // The URL the frame is navigating to. This may change during the navigation |
51 // when encountering a server redirect. | 53 // when encountering a server redirect. |
52 // This URL may not be the same as the virtual URL returned from | 54 // This URL may not be the same as the virtual URL returned from |
53 // WebContents::GetVisibleURL and WebContents::GetLastCommittedURL. For | 55 // WebContents::GetVisibleURL and WebContents::GetLastCommittedURL. For |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 289 |
288 // The NavigationData that the embedder returned from | 290 // The NavigationData that the embedder returned from |
289 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 291 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
290 // be a clone of the NavigationData. | 292 // be a clone of the NavigationData. |
291 virtual NavigationData* GetNavigationData() = 0; | 293 virtual NavigationData* GetNavigationData() = 0; |
292 }; | 294 }; |
293 | 295 |
294 } // namespace content | 296 } // namespace content |
295 | 297 |
296 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 298 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |