OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 void set_transferred_global_request_id( | 136 void set_transferred_global_request_id( |
137 const GlobalRequestID& transferred_global_request_id) { | 137 const GlobalRequestID& transferred_global_request_id) { |
138 transferred_global_request_id_ = transferred_global_request_id; | 138 transferred_global_request_id_ = transferred_global_request_id; |
139 } | 139 } |
140 | 140 |
141 GlobalRequestID transferred_global_request_id() const { | 141 GlobalRequestID transferred_global_request_id() const { |
142 return transferred_global_request_id_; | 142 return transferred_global_request_id_; |
143 } | 143 } |
144 | 144 |
| 145 // Whether this (pending) navigation is reload across site instances. |
| 146 // Resets to false after commit. |
| 147 void set_is_cross_site_reload(bool is_cross_site_reload) { |
| 148 is_cross_site_reload_ = is_cross_site_reload; |
| 149 } |
| 150 bool is_cross_site_reload() const { |
| 151 return is_cross_site_reload_; |
| 152 } |
| 153 |
145 private: | 154 private: |
146 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 155 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
147 // Session/Tab restore save portions of this class so that it can be recreated | 156 // Session/Tab restore save portions of this class so that it can be recreated |
148 // later. If you add a new field that needs to be persisted you'll have to | 157 // later. If you add a new field that needs to be persisted you'll have to |
149 // update SessionService/TabRestoreService appropriately. | 158 // update SessionService/TabRestoreService appropriately. |
150 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 159 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
151 | 160 |
152 // See the accessors above for descriptions. | 161 // See the accessors above for descriptions. |
153 int unique_id_; | 162 int unique_id_; |
154 scoped_refptr<SiteInstanceImpl> site_instance_; | 163 scoped_refptr<SiteInstanceImpl> site_instance_; |
(...skipping 28 matching lines...) Expand all Loading... |
183 | 192 |
184 // In case a navigation is transferred to a new RVH but the request has | 193 // In case a navigation is transferred to a new RVH but the request has |
185 // been generated in the renderer already, this identifies the old request so | 194 // been generated in the renderer already, this identifies the old request so |
186 // that it can be resumed. The old request is stored until the | 195 // that it can be resumed. The old request is stored until the |
187 // ResourceDispatcher receives the navigation from the renderer which | 196 // ResourceDispatcher receives the navigation from the renderer which |
188 // carries this |transferred_global_request_id_| annotation. Once the request | 197 // carries this |transferred_global_request_id_| annotation. Once the request |
189 // is transferred to the new process, this is cleared and the request | 198 // is transferred to the new process, this is cleared and the request |
190 // continues as normal. | 199 // continues as normal. |
191 GlobalRequestID transferred_global_request_id_; | 200 GlobalRequestID transferred_global_request_id_; |
192 | 201 |
| 202 // This is set to true when this entry is being reloaded and due to changes in |
| 203 // the state of the URL, it has to be reloaded in a different site instance. |
| 204 // In such case, we must treat it as an existing navigation in the new site |
| 205 // instance, instead of a new navigation. This value should not be persisted |
| 206 // and is not needed after the entry commits. |
| 207 bool is_cross_site_reload_; |
| 208 |
193 // Copy and assignment is explicitly allowed for this class. | 209 // Copy and assignment is explicitly allowed for this class. |
194 }; | 210 }; |
195 | 211 |
196 } // namespace content | 212 } // namespace content |
197 | 213 |
198 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 214 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |