| 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 of the |
| 111 // frame that initiated the 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 // page. This screenshot is displayed during an overscroll-navigation | 268 // page. This screenshot is displayed during an overscroll-navigation |
| 262 // gesture. |screenshot_| will be NULL when the screenshot is not available | 269 // gesture. |screenshot_| will be NULL when the screenshot is not available |
| 263 // (e.g. after a session restore, or if taking the screenshot of a page | 270 // (e.g. after a session restore, or if taking the screenshot of a page |
| 264 // failed). The UI is responsible for dealing with missing screenshots | 271 // failed). The UI is responsible for dealing with missing screenshots |
| 265 // appropriately (e.g. display a placeholder image instead). | 272 // appropriately (e.g. display a placeholder image instead). |
| 266 scoped_refptr<base::RefCountedBytes> screenshot_; | 273 scoped_refptr<base::RefCountedBytes> screenshot_; |
| 267 | 274 |
| 268 // This member is not persisted with session restore. | 275 // This member is not persisted with session restore. |
| 269 std::string extra_headers_; | 276 std::string extra_headers_; |
| 270 | 277 |
| 278 // This member is cleared in |ResetForCommit| and not persisted. |
| 279 scoped_refptr<SiteInstanceImpl> source_site_instance_; |
| 280 |
| 271 // Used for specifying base URL for pages loaded via data URLs. Only used and | 281 // Used for specifying base URL for pages loaded via data URLs. Only used and |
| 272 // persisted by Android WebView. | 282 // persisted by Android WebView. |
| 273 GURL base_url_for_data_url_; | 283 GURL base_url_for_data_url_; |
| 274 | 284 |
| 275 // Whether the entry, while loading, was created for a renderer-initiated | 285 // Whether the entry, while loading, was created for a renderer-initiated |
| 276 // navigation. This dictates whether the URL should be displayed before the | 286 // navigation. This dictates whether the URL should be displayed before the |
| 277 // navigation commits. It is cleared in |ResetForCommit| and not persisted. | 287 // navigation commits. It is cleared in |ResetForCommit| and not persisted. |
| 278 bool is_renderer_initiated_; | 288 bool is_renderer_initiated_; |
| 279 | 289 |
| 280 // This is a cached version of the result of GetTitleForDisplay. It prevents | 290 // This is a cached version of the result of GetTitleForDisplay. It prevents |
| (...skipping 54 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 | 345 // persisted, unless specific data is taken out/put back in at save/restore |
| 336 // time (see TabNavigation for an example of this). | 346 // time (see TabNavigation for an example of this). |
| 337 std::map<std::string, base::string16> extra_data_; | 347 std::map<std::string, base::string16> extra_data_; |
| 338 | 348 |
| 339 // Copy and assignment is explicitly allowed for this class. | 349 // Copy and assignment is explicitly allowed for this class. |
| 340 }; | 350 }; |
| 341 | 351 |
| 342 } // namespace content | 352 } // namespace content |
| 343 | 353 |
| 344 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 354 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |