OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_REQUEST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void set_associated_site_instance_type(AssociatedSiteInstanceType type) { | 140 void set_associated_site_instance_type(AssociatedSiteInstanceType type) { |
141 associated_site_instance_type_ = type; | 141 associated_site_instance_type_ = type; |
142 } | 142 } |
143 | 143 |
144 NavigationHandleImpl* navigation_handle() const { | 144 NavigationHandleImpl* navigation_handle() const { |
145 return navigation_handle_.get(); | 145 return navigation_handle_.get(); |
146 } | 146 } |
147 | 147 |
148 // Creates a NavigationHandle. This should be called after any previous | 148 // Creates a NavigationHandle. This should be called after any previous |
149 // NavigationRequest for the FrameTreeNode has been destroyed. | 149 // NavigationRequest for the FrameTreeNode has been destroyed. |
150 void CreateNavigationHandle(int pending_nav_entry_id); | 150 void CreateNavigationHandle(int pending_nav_entry_id, bool has_user_gesture); |
151 | 151 |
152 // Transfers the ownership of the NavigationHandle to |render_frame_host|. | 152 // Transfers the ownership of the NavigationHandle to |render_frame_host|. |
153 // This should be called when the navigation is ready to commit, because the | 153 // This should be called when the navigation is ready to commit, because the |
154 // NavigationHandle outlives the NavigationRequest. The NavigationHandle's | 154 // NavigationHandle outlives the NavigationRequest. The NavigationHandle's |
155 // lifetime is the entire navigation, while the NavigationRequest is | 155 // lifetime is the entire navigation, while the NavigationRequest is |
156 // destroyed when a navigation is ready for commit. | 156 // destroyed when a navigation is ready for commit. |
157 void TransferNavigationHandleOwnership( | 157 void TransferNavigationHandleOwnership( |
158 RenderFrameHostImpl* render_frame_host); | 158 RenderFrameHostImpl* render_frame_host); |
159 | 159 |
160 private: | 160 private: |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // the WillProcessResponse checks are performed by the NavigationHandle. | 228 // the WillProcessResponse checks are performed by the NavigationHandle. |
229 scoped_refptr<ResourceResponse> response_; | 229 scoped_refptr<ResourceResponse> response_; |
230 std::unique_ptr<StreamHandle> body_; | 230 std::unique_ptr<StreamHandle> body_; |
231 | 231 |
232 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); | 232 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
233 }; | 233 }; |
234 | 234 |
235 } // namespace content | 235 } // namespace content |
236 | 236 |
237 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 237 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
OLD | NEW |