| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 DCHECK(state_ == NOT_STARTED); | 122 DCHECK(state_ == NOT_STARTED); |
| 123 state_ = WAITING_FOR_RENDERER_RESPONSE; | 123 state_ = WAITING_FOR_RENDERER_RESPONSE; |
| 124 } | 124 } |
| 125 | 125 |
| 126 NavigationHandleImpl* navigation_handle() const { | 126 NavigationHandleImpl* navigation_handle() const { |
| 127 return navigation_handle_.get(); | 127 return navigation_handle_.get(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 // Creates a NavigationHandle. This should be called after any previous | 130 // Creates a NavigationHandle. This should be called after any previous |
| 131 // NavigationRequest for the FrameTreeNode has been destroyed. | 131 // NavigationRequest for the FrameTreeNode has been destroyed. |
| 132 void CreateNavigationHandle(); | 132 void CreateNavigationHandle(int pending_nav_entry_id); |
| 133 | 133 |
| 134 // Transfers the ownership of the NavigationHandle to |render_frame_host|. | 134 // Transfers the ownership of the NavigationHandle to |render_frame_host|. |
| 135 // This should be called when the navigation is ready to commit, because the | 135 // This should be called when the navigation is ready to commit, because the |
| 136 // NavigationHandle outlives the NavigationRequest. The NavigationHandle's | 136 // NavigationHandle outlives the NavigationRequest. The NavigationHandle's |
| 137 // lifetime is the entire navigation, while the NavigationRequest is | 137 // lifetime is the entire navigation, while the NavigationRequest is |
| 138 // destroyed when a navigation is ready for commit. | 138 // destroyed when a navigation is ready for commit. |
| 139 void TransferNavigationHandleOwnership( | 139 void TransferNavigationHandleOwnership( |
| 140 RenderFrameHostImpl* render_frame_host); | 140 RenderFrameHostImpl* render_frame_host); |
| 141 | 141 |
| 142 private: | 142 private: |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 int bindings_; | 201 int bindings_; |
| 202 | 202 |
| 203 scoped_ptr<NavigationHandleImpl> navigation_handle_; | 203 scoped_ptr<NavigationHandleImpl> navigation_handle_; |
| 204 | 204 |
| 205 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); | 205 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 } // namespace content | 208 } // namespace content |
| 209 | 209 |
| 210 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 210 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
| OLD | NEW |