OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 // counted pointer to a shared site instance. | 100 // counted pointer to a shared site instance. |
101 // | 101 // |
102 // Note that the SiteInstance should usually not be changed after it is set, | 102 // Note that the SiteInstance should usually not be changed after it is set, |
103 // but this may happen if the NavigationEntry was cloned and needs to use a | 103 // but this may happen if the NavigationEntry was cloned and needs to use a |
104 // different SiteInstance. | 104 // different SiteInstance. |
105 void set_site_instance(SiteInstanceImpl* site_instance); | 105 void set_site_instance(SiteInstanceImpl* site_instance); |
106 SiteInstanceImpl* site_instance() const { | 106 SiteInstanceImpl* site_instance() const { |
107 return site_instance_.get(); | 107 return site_instance_.get(); |
108 } | 108 } |
109 | 109 |
110 // The source_site_instance is used to identify the SiteInstance that | |
Charlie Reis
2014/12/06 00:18:50
nit: the SiteInstance of the frame that initiated
lfg
2014/12/08 20:45:32
Done.
| |
111 // initiated the navigation in case of a cross-site navigation. | |
112 void set_source_site_instance(SiteInstanceImpl* source_site_instance); | |
113 SiteInstanceImpl* source_site_instance() const { | |
114 return source_site_instance_.get(); | |
115 } | |
116 | |
110 // Remember the set of bindings granted to this NavigationEntry at the time | 117 // Remember the set of bindings granted to this NavigationEntry at the time |
111 // of commit, to ensure that we do not grant it additional bindings if we | 118 // of commit, to ensure that we do not grant it additional bindings if we |
112 // navigate back to it in the future. This can only be changed once. | 119 // navigate back to it in the future. This can only be changed once. |
113 void SetBindings(int bindings); | 120 void SetBindings(int bindings); |
114 int bindings() const { | 121 int bindings() const { |
115 return bindings_; | 122 return bindings_; |
116 } | 123 } |
117 | 124 |
118 void set_page_type(PageType page_type) { | 125 void set_page_type(PageType page_type) { |
119 page_type_ = page_type; | 126 page_type_ = page_type; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 227 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
221 // Session/Tab restore save portions of this class so that it can be recreated | 228 // Session/Tab restore save portions of this class so that it can be recreated |
222 // later. If you add a new field that needs to be persisted you'll have to | 229 // later. If you add a new field that needs to be persisted you'll have to |
223 // update SessionService/TabRestoreService and Android WebView | 230 // update SessionService/TabRestoreService and Android WebView |
224 // state_serializer.cc appropriately. | 231 // state_serializer.cc appropriately. |
225 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 232 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
226 | 233 |
227 // See the accessors above for descriptions. | 234 // See the accessors above for descriptions. |
228 int unique_id_; | 235 int unique_id_; |
229 scoped_refptr<SiteInstanceImpl> site_instance_; | 236 scoped_refptr<SiteInstanceImpl> site_instance_; |
237 scoped_refptr<SiteInstanceImpl> source_site_instance_; | |
Charlie Reis
2014/12/06 00:18:50
This is solely used as input for determining site_
lfg
2014/12/08 20:45:32
Done.
| |
230 // TODO(creis): Persist bindings_. http://crbug.com/173672. | 238 // TODO(creis): Persist bindings_. http://crbug.com/173672. |
231 int bindings_; | 239 int bindings_; |
232 PageType page_type_; | 240 PageType page_type_; |
233 GURL url_; | 241 GURL url_; |
234 Referrer referrer_; | 242 Referrer referrer_; |
235 GURL virtual_url_; | 243 GURL virtual_url_; |
236 bool update_virtual_url_with_url_; | 244 bool update_virtual_url_with_url_; |
237 base::string16 title_; | 245 base::string16 title_; |
238 FaviconStatus favicon_; | 246 FaviconStatus favicon_; |
239 PageState page_state_; | 247 PageState page_state_; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
335 // persisted, unless specific data is taken out/put back in at save/restore | 343 // persisted, unless specific data is taken out/put back in at save/restore |
336 // time (see TabNavigation for an example of this). | 344 // time (see TabNavigation for an example of this). |
337 std::map<std::string, base::string16> extra_data_; | 345 std::map<std::string, base::string16> extra_data_; |
338 | 346 |
339 // Copy and assignment is explicitly allowed for this class. | 347 // Copy and assignment is explicitly allowed for this class. |
340 }; | 348 }; |
341 | 349 |
342 } // namespace content | 350 } // namespace content |
343 | 351 |
344 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 352 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |