| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 // The RestoreType for this entry. This is set if the entry was retored. This | 383 // The RestoreType for this entry. This is set if the entry was retored. This |
| 384 // is set to RESTORE_NONE once the entry is loaded. | 384 // is set to RESTORE_NONE once the entry is loaded. |
| 385 void set_restore_type(RestoreType type) { | 385 void set_restore_type(RestoreType type) { |
| 386 restore_type_ = type; | 386 restore_type_ = type; |
| 387 } | 387 } |
| 388 RestoreType restore_type() const { | 388 RestoreType restore_type() const { |
| 389 return restore_type_; | 389 return restore_type_; |
| 390 } | 390 } |
| 391 | 391 |
| 392 // The ISO 639-1 language code (ex: en, fr, zh...) for the page. | |
| 393 // Can be empty if the language was not detected yet or is unknown. | |
| 394 void set_language(const std::string& language) { | |
| 395 language_ = language; | |
| 396 } | |
| 397 std::string language() const { | |
| 398 return language_; | |
| 399 } | |
| 400 | |
| 401 private: | 392 private: |
| 402 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 393 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 403 // Session/Tab restore save portions of this class so that it can be recreated | 394 // Session/Tab restore save portions of this class so that it can be recreated |
| 404 // later. If you add a new field that needs to be persisted you'll have to | 395 // later. If you add a new field that needs to be persisted you'll have to |
| 405 // update SessionService/TabRestoreService appropriately. | 396 // update SessionService/TabRestoreService appropriately. |
| 406 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 397 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 407 | 398 |
| 408 // See the accessors above for descriptions. | 399 // See the accessors above for descriptions. |
| 409 int unique_id_; | 400 int unique_id_; |
| 410 scoped_refptr<SiteInstance> site_instance_; | 401 scoped_refptr<SiteInstance> site_instance_; |
| 411 PageType page_type_; | 402 PageType page_type_; |
| 412 GURL url_; | 403 GURL url_; |
| 413 GURL referrer_; | 404 GURL referrer_; |
| 414 GURL virtual_url_; | 405 GURL virtual_url_; |
| 415 bool update_virtual_url_with_url_; | 406 bool update_virtual_url_with_url_; |
| 416 string16 title_; | 407 string16 title_; |
| 417 FaviconStatus favicon_; | 408 FaviconStatus favicon_; |
| 418 std::string content_state_; | 409 std::string content_state_; |
| 419 int32 page_id_; | 410 int32 page_id_; |
| 420 SSLStatus ssl_; | 411 SSLStatus ssl_; |
| 421 PageTransition::Type transition_type_; | 412 PageTransition::Type transition_type_; |
| 422 GURL user_typed_url_; | 413 GURL user_typed_url_; |
| 423 bool has_post_data_; | 414 bool has_post_data_; |
| 424 RestoreType restore_type_; | 415 RestoreType restore_type_; |
| 425 std::string language_; // ISO 639-1 language code. | |
| 426 | 416 |
| 427 // This is a cached version of the result of GetTitleForDisplay. It prevents | 417 // This is a cached version of the result of GetTitleForDisplay. It prevents |
| 428 // us from having to do URL formatting on the URL evey time the title is | 418 // us from having to do URL formatting on the URL evey time the title is |
| 429 // displayed. When the URL, virtual URL, or title is set, this should be | 419 // displayed. When the URL, virtual URL, or title is set, this should be |
| 430 // cleared to force a refresh. | 420 // cleared to force a refresh. |
| 431 string16 cached_display_title_; | 421 string16 cached_display_title_; |
| 432 | 422 |
| 433 // Copy and assignment is explicitly allowed for this class. | 423 // Copy and assignment is explicitly allowed for this class. |
| 434 }; | 424 }; |
| 435 | 425 |
| 436 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 426 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
| OLD | NEW |