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