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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
324 } | 324 } |
325 | 325 |
326 // Extra headers (separated by \n) to send during the request. | 326 // Extra headers (separated by \n) to send during the request. |
327 void set_extra_headers(const std::string& extra_headers) { | 327 void set_extra_headers(const std::string& extra_headers) { |
328 extra_headers_ = extra_headers; | 328 extra_headers_ = extra_headers; |
329 } | 329 } |
330 const std::string& extra_headers() const { | 330 const std::string& extra_headers() const { |
331 return extra_headers_; | 331 return extra_headers_; |
332 } | 332 } |
333 | 333 |
334 // Used to support swapouts of frames with non-null openers | |
Charlie Reis
2011/12/12 22:20:36
End comments with a period.
supersat
2011/12/15 19:30:49
Done.
| |
335 void set_opener_browsing_instance_frame_id(int64 id) { | |
336 opener_browsing_instance_frame_id_ = id; | |
337 } | |
338 | |
339 int64 opener_browsing_instance_frame_id() const { | |
340 return opener_browsing_instance_frame_id_; | |
341 } | |
342 | |
334 // Page-related helpers ------------------------------------------------------ | 343 // Page-related helpers ------------------------------------------------------ |
335 | 344 |
336 // Returns the title to be displayed on the tab. This could be the title of | 345 // Returns the title to be displayed on the tab. This could be the title of |
337 // the page if it is available or the URL. |languages| is the list of | 346 // the page if it is available or the URL. |languages| is the list of |
338 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper | 347 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper |
339 // URL formatting isn't needed (e.g., unit tests). | 348 // URL formatting isn't needed (e.g., unit tests). |
340 const string16& GetTitleForDisplay(const std::string& languages) const; | 349 const string16& GetTitleForDisplay(const std::string& languages) const; |
341 | 350 |
342 // Returns true if the current tab is in view source mode. This will be false | 351 // Returns true if the current tab is in view source mode. This will be false |
343 // if there is no navigation. | 352 // if there is no navigation. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
440 bool update_virtual_url_with_url_; | 449 bool update_virtual_url_with_url_; |
441 string16 title_; | 450 string16 title_; |
442 FaviconStatus favicon_; | 451 FaviconStatus favicon_; |
443 std::string content_state_; | 452 std::string content_state_; |
444 int32 page_id_; | 453 int32 page_id_; |
445 SSLStatus ssl_; | 454 SSLStatus ssl_; |
446 content::PageTransition transition_type_; | 455 content::PageTransition transition_type_; |
447 GURL user_typed_url_; | 456 GURL user_typed_url_; |
448 bool has_post_data_; | 457 bool has_post_data_; |
449 RestoreType restore_type_; | 458 RestoreType restore_type_; |
459 int64 opener_browsing_instance_frame_id_; | |
450 | 460 |
451 // This member is not persisted with sesssion restore. | 461 // This member is not persisted with sesssion restore. |
452 std::string extra_headers_; | 462 std::string extra_headers_; |
453 | 463 |
454 // Whether the entry, while loading, was created for a renderer-initiated | 464 // Whether the entry, while loading, was created for a renderer-initiated |
455 // navigation. This dictates whether the URL should be displayed before the | 465 // navigation. This dictates whether the URL should be displayed before the |
456 // navigation commits. It is cleared on commit and not persisted. | 466 // navigation commits. It is cleared on commit and not persisted. |
457 bool is_renderer_initiated_; | 467 bool is_renderer_initiated_; |
458 | 468 |
459 // This is a cached version of the result of GetTitleForDisplay. It prevents | 469 // This is a cached version of the result of GetTitleForDisplay. It prevents |
460 // us from having to do URL formatting on the URL every time the title is | 470 // us from having to do URL formatting on the URL every time the title is |
461 // displayed. When the URL, virtual URL, or title is set, this should be | 471 // displayed. When the URL, virtual URL, or title is set, this should be |
462 // cleared to force a refresh. | 472 // cleared to force a refresh. |
463 mutable string16 cached_display_title_; | 473 mutable string16 cached_display_title_; |
464 | 474 |
465 // In case a navigation is transferred to a new RVH but the request has | 475 // In case a navigation is transferred to a new RVH but the request has |
466 // been generated in the renderer already, this identifies the old request so | 476 // been generated in the renderer already, this identifies the old request so |
467 // that it can be resumed. The old request is stored until the | 477 // that it can be resumed. The old request is stored until the |
468 // ResourceDispatcher receives the navigation from the renderer which | 478 // ResourceDispatcher receives the navigation from the renderer which |
469 // carries this |transferred_global_request_id_| annotation. Once the request | 479 // carries this |transferred_global_request_id_| annotation. Once the request |
470 // is transferred to the new process, this is cleared and the request | 480 // is transferred to the new process, this is cleared and the request |
471 // continues as normal. | 481 // continues as normal. |
472 GlobalRequestID transferred_global_request_id_; | 482 GlobalRequestID transferred_global_request_id_; |
473 | 483 |
474 // Copy and assignment is explicitly allowed for this class. | 484 // Copy and assignment is explicitly allowed for this class. |
475 }; | 485 }; |
476 | 486 |
477 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 487 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
OLD | NEW |