Chromium Code Reviews| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 311 } | 311 } |
| 312 | 312 |
| 313 // All the SSL flags and state. See SSLStatus above. | 313 // All the SSL flags and state. See SSLStatus above. |
| 314 const SSLStatus& ssl() const { | 314 const SSLStatus& ssl() const { |
| 315 return ssl_; | 315 return ssl_; |
| 316 } | 316 } |
| 317 SSLStatus& ssl() { | 317 SSLStatus& ssl() { |
| 318 return ssl_; | 318 return ssl_; |
| 319 } | 319 } |
| 320 | 320 |
| 321 // Extra headers (separated by \n) to send during the request. | |
| 322 void set_extra_headers(const std::string& extra_headers) { | |
| 323 extra_headers_ = extra_headers; | |
| 324 } | |
| 325 const std::string& extra_headers() const { | |
| 326 return extra_headers_; | |
| 327 } | |
| 328 | |
| 321 // Page-related helpers ------------------------------------------------------ | 329 // Page-related helpers ------------------------------------------------------ |
| 322 | 330 |
| 323 // Returns the title to be displayed on the tab. This could be the title of | 331 // Returns the title to be displayed on the tab. This could be the title of |
| 324 // the page if it is available or the URL. |languages| is the list of | 332 // the page if it is available or the URL. |languages| is the list of |
| 325 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper | 333 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper |
| 326 // URL formatting isn't needed (e.g., unit tests). | 334 // URL formatting isn't needed (e.g., unit tests). |
| 327 const string16& GetTitleForDisplay(const std::string& languages) const; | 335 const string16& GetTitleForDisplay(const std::string& languages) const; |
| 328 | 336 |
| 329 // Returns true if the current tab is in view source mode. This will be false | 337 // Returns true if the current tab is in view source mode. This will be false |
| 330 // if there is no navigation. | 338 // if there is no navigation. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 bool update_virtual_url_with_url_; | 417 bool update_virtual_url_with_url_; |
| 410 string16 title_; | 418 string16 title_; |
| 411 FaviconStatus favicon_; | 419 FaviconStatus favicon_; |
| 412 std::string content_state_; | 420 std::string content_state_; |
| 413 int32 page_id_; | 421 int32 page_id_; |
| 414 SSLStatus ssl_; | 422 SSLStatus ssl_; |
| 415 PageTransition::Type transition_type_; | 423 PageTransition::Type transition_type_; |
| 416 GURL user_typed_url_; | 424 GURL user_typed_url_; |
| 417 bool has_post_data_; | 425 bool has_post_data_; |
| 418 RestoreType restore_type_; | 426 RestoreType restore_type_; |
| 427 std::string extra_headers_; | |
|
sky
2011/09/01 03:46:44
Put a newline between 426 and 427 and document thi
Roger Tawa OOO till Jul 10th
2011/09/01 13:52:58
Done.
| |
| 419 | 428 |
| 420 // This is a cached version of the result of GetTitleForDisplay. It prevents | 429 // This is a cached version of the result of GetTitleForDisplay. It prevents |
| 421 // us from having to do URL formatting on the URL evey time the title is | 430 // us from having to do URL formatting on the URL every time the title is |
| 422 // displayed. When the URL, virtual URL, or title is set, this should be | 431 // displayed. When the URL, virtual URL, or title is set, this should be |
| 423 // cleared to force a refresh. | 432 // cleared to force a refresh. |
| 424 mutable string16 cached_display_title_; | 433 mutable string16 cached_display_title_; |
| 425 | 434 |
| 426 // Copy and assignment is explicitly allowed for this class. | 435 // Copy and assignment is explicitly allowed for this class. |
| 427 }; | 436 }; |
| 428 | 437 |
| 429 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 438 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
| OLD | NEW |