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_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
322 } | 322 } |
323 | 323 |
324 // Extra headers (separated by \n) to send during the request. | 324 // Extra headers (separated by \n) to send during the request. |
325 void set_extra_headers(const std::string& extra_headers) { | 325 void set_extra_headers(const std::string& extra_headers) { |
326 extra_headers_ = extra_headers; | 326 extra_headers_ = extra_headers; |
327 } | 327 } |
328 const std::string& extra_headers() const { | 328 const std::string& extra_headers() const { |
329 return extra_headers_; | 329 return extra_headers_; |
330 } | 330 } |
331 | 331 |
332 // Used to support swapouts of frames with non-null openers | |
333 void set_opener_browsing_instance_frame_id(int64 id) { | |
334 opener_browsing_instance_frame_id_ = id; | |
335 } | |
336 | |
337 int64 opener_browsing_instance_frame_id() const { | |
338 return opener_browsing_instance_frame_id_; | |
339 } | |
340 | |
332 // Page-related helpers ------------------------------------------------------ | 341 // Page-related helpers ------------------------------------------------------ |
333 | 342 |
334 // Returns the title to be displayed on the tab. This could be the title of | 343 // Returns the title to be displayed on the tab. This could be the title of |
335 // the page if it is available or the URL. |languages| is the list of | 344 // the page if it is available or the URL. |languages| is the list of |
336 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper | 345 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper |
337 // URL formatting isn't needed (e.g., unit tests). | 346 // URL formatting isn't needed (e.g., unit tests). |
338 const string16& GetTitleForDisplay(const std::string& languages) const; | 347 const string16& GetTitleForDisplay(const std::string& languages) const; |
339 | 348 |
340 // Returns true if the current tab is in view source mode. This will be false | 349 // Returns true if the current tab is in view source mode. This will be false |
341 // if there is no navigation. | 350 // if there is no navigation. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
429 bool update_virtual_url_with_url_; | 438 bool update_virtual_url_with_url_; |
430 string16 title_; | 439 string16 title_; |
431 FaviconStatus favicon_; | 440 FaviconStatus favicon_; |
432 std::string content_state_; | 441 std::string content_state_; |
433 int32 page_id_; | 442 int32 page_id_; |
434 SSLStatus ssl_; | 443 SSLStatus ssl_; |
435 content::PageTransition transition_type_; | 444 content::PageTransition transition_type_; |
436 GURL user_typed_url_; | 445 GURL user_typed_url_; |
437 bool has_post_data_; | 446 bool has_post_data_; |
438 RestoreType restore_type_; | 447 RestoreType restore_type_; |
448 int64 opener_browsing_instance_frame_id_; | |
Charlie Reis
2011/12/01 23:13:02
Do we need to persist this? (I suppose it could l
supersat
2011/12/09 23:08:20
We'll only need to persist this if we restore scri
Charlie Reis
2011/12/12 22:20:36
Let's avoid persisting it for now, then, and we ca
supersat
2011/12/15 19:30:49
Done.
| |
439 | 449 |
440 // This member is not persisted with sesssion restore. | 450 // This member is not persisted with sesssion restore. |
441 std::string extra_headers_; | 451 std::string extra_headers_; |
442 | 452 |
443 // Whether the entry, while loading, was created for a renderer-initiated | 453 // Whether the entry, while loading, was created for a renderer-initiated |
444 // navigation. This dictates whether the URL should be displayed before the | 454 // navigation. This dictates whether the URL should be displayed before the |
445 // navigation commits. It is cleared on commit and not persisted. | 455 // navigation commits. It is cleared on commit and not persisted. |
446 bool is_renderer_initiated_; | 456 bool is_renderer_initiated_; |
447 | 457 |
448 // This is a cached version of the result of GetTitleForDisplay. It prevents | 458 // This is a cached version of the result of GetTitleForDisplay. It prevents |
449 // us from having to do URL formatting on the URL every time the title is | 459 // us from having to do URL formatting on the URL every time the title is |
450 // displayed. When the URL, virtual URL, or title is set, this should be | 460 // displayed. When the URL, virtual URL, or title is set, this should be |
451 // cleared to force a refresh. | 461 // cleared to force a refresh. |
452 mutable string16 cached_display_title_; | 462 mutable string16 cached_display_title_; |
453 | 463 |
454 // Copy and assignment is explicitly allowed for this class. | 464 // Copy and assignment is explicitly allowed for this class. |
455 }; | 465 }; |
456 | 466 |
457 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 467 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
OLD | NEW |