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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "content/browser/renderer_host/global_request_id.h" |
13 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
14 #include "content/public/common/page_transition_types.h" | 15 #include "content/public/common/page_transition_types.h" |
15 #include "content/public/common/page_type.h" | 16 #include "content/public/common/page_type.h" |
16 #include "content/public/common/security_style.h" | 17 #include "content/public/common/security_style.h" |
17 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
18 #include "net/base/cert_status_flags.h" | 19 #include "net/base/cert_status_flags.h" |
19 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
20 | 21 |
21 class SiteInstance; | 22 class SiteInstance; |
22 | 23 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 406 |
406 // The RestoreType for this entry. This is set if the entry was retored. This | 407 // The RestoreType for this entry. This is set if the entry was retored. This |
407 // is set to RESTORE_NONE once the entry is loaded. | 408 // is set to RESTORE_NONE once the entry is loaded. |
408 void set_restore_type(RestoreType type) { | 409 void set_restore_type(RestoreType type) { |
409 restore_type_ = type; | 410 restore_type_ = type; |
410 } | 411 } |
411 RestoreType restore_type() const { | 412 RestoreType restore_type() const { |
412 return restore_type_; | 413 return restore_type_; |
413 } | 414 } |
414 | 415 |
| 416 void set_transferred_global_request_id( |
| 417 const GlobalRequestID& transferred_global_request_id) { |
| 418 transferred_global_request_id_ = transferred_global_request_id; |
| 419 } |
| 420 |
| 421 GlobalRequestID transferred_global_request_id() const { |
| 422 return transferred_global_request_id_; |
| 423 } |
| 424 |
415 private: | 425 private: |
416 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 426 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
417 // Session/Tab restore save portions of this class so that it can be recreated | 427 // Session/Tab restore save portions of this class so that it can be recreated |
418 // later. If you add a new field that needs to be persisted you'll have to | 428 // later. If you add a new field that needs to be persisted you'll have to |
419 // update SessionService/TabRestoreService appropriately. | 429 // update SessionService/TabRestoreService appropriately. |
420 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 430 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
421 | 431 |
422 // See the accessors above for descriptions. | 432 // See the accessors above for descriptions. |
423 int unique_id_; | 433 int unique_id_; |
424 scoped_refptr<SiteInstance> site_instance_; | 434 scoped_refptr<SiteInstance> site_instance_; |
(...skipping 19 matching lines...) Expand all Loading... |
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 |
| 464 // In case a navigation is transferred to a new RVH but the request has |
| 465 // been generated in the renderer already, this identifies the old request so |
| 466 // that it can be resumed. The old request is stored until the |
| 467 // ResourceDispatcher receives the navigation from the renderer which |
| 468 // carries this |transferred_global_request_id_| annotation. Once the request |
| 469 // is transferred to the new process, this is cleared and the request |
| 470 // continues as normal. |
| 471 GlobalRequestID transferred_global_request_id_; |
| 472 |
454 // Copy and assignment is explicitly allowed for this class. | 473 // Copy and assignment is explicitly allowed for this class. |
455 }; | 474 }; |
456 | 475 |
457 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 476 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
OLD | NEW |