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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 bool new_method_is_post, | 119 bool new_method_is_post, |
120 const GURL& new_referrer_url, | 120 const GURL& new_referrer_url, |
121 bool new_is_external_protocol) override; | 121 bool new_is_external_protocol) override; |
122 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting( | 122 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting( |
123 RenderFrameHost* render_frame_host, | 123 RenderFrameHost* render_frame_host, |
124 const std::string& raw_response_header) override; | 124 const std::string& raw_response_header) override; |
125 void CallDidCommitNavigationForTesting(const GURL& url) override; | 125 void CallDidCommitNavigationForTesting(const GURL& url) override; |
126 | 126 |
127 NavigationData* GetNavigationData() override; | 127 NavigationData* GetNavigationData() override; |
128 | 128 |
| 129 // The NavigatorDelegate to notify/query for various navigation events. |
| 130 // Normally this is the WebContents, except if this NavigationHandle was |
| 131 // created during a navigation to an interstitial page. In this case it will |
| 132 // be the InterstitialPage itself. |
| 133 // |
| 134 // Note: due to the interstitial navigation case, all calls that can possibly |
| 135 // expose the NavigationHandle to code outside of content/ MUST go though the |
| 136 // NavigatorDelegate. In particular, the ContentBrowserClient should not be |
| 137 // called directly form the NavigationHandle code. Thus, these calls will not |
| 138 // expose the NavigationHandle when navigating to an InterstialPage. |
129 NavigatorDelegate* GetDelegate() const; | 139 NavigatorDelegate* GetDelegate() const; |
130 | 140 |
131 RequestContextType GetRequestContextType() const; | 141 RequestContextType GetRequestContextType() const; |
132 | 142 |
133 // Get the unique id from the NavigationEntry associated with this | 143 // Get the unique id from the NavigationEntry associated with this |
134 // NavigationHandle. Note that a synchronous, renderer-initiated navigation | 144 // NavigationHandle. Note that a synchronous, renderer-initiated navigation |
135 // will not have a NavigationEntry associated with it, and this will return 0. | 145 // will not have a NavigationEntry associated with it, and this will return 0. |
136 int pending_nav_entry_id() const { return pending_nav_entry_id_; } | 146 int pending_nav_entry_id() const { return pending_nav_entry_id_; } |
137 | 147 |
138 // Changes the pending NavigationEntry ID for this handle. This is currently | 148 // Changes the pending NavigationEntry ID for this handle. This is currently |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 std::unique_ptr<NavigationData> navigation_data_; | 351 std::unique_ptr<NavigationData> navigation_data_; |
342 | 352 |
343 SSLStatus ssl_status_; | 353 SSLStatus ssl_status_; |
344 | 354 |
345 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 355 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
346 }; | 356 }; |
347 | 357 |
348 } // namespace content | 358 } // namespace content |
349 | 359 |
350 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 360 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
OLD | NEW |