1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/frame_host/frame_navigation_entry.h"
9 FrameNavigationEntry::FrameNavigationEntry(int frame_tree_node_id
)
10 : frame_tree_node_id_(frame_tree_node_id
),
11 item_sequence_number_(-1),
12 document_sequence_number_(-1) {
15 FrameNavigationEntry::FrameNavigationEntry(int frame_tree_node_id
,
16 int64 item_sequence_number
,
17 int64 document_sequence_number
,
18 SiteInstanceImpl
* site_instance
,
20 const Referrer
& referrer
)
21 : frame_tree_node_id_(frame_tree_node_id
),
22 item_sequence_number_(item_sequence_number
),
23 document_sequence_number_(document_sequence_number
),
24 site_instance_(site_instance
),
29 FrameNavigationEntry::~FrameNavigationEntry() {
32 FrameNavigationEntry
* FrameNavigationEntry::Clone() const {
33 FrameNavigationEntry
* copy
= new FrameNavigationEntry(frame_tree_node_id_
);
34 copy
->UpdateEntry(item_sequence_number_
, document_sequence_number_
,
35 site_instance_
.get(), url_
, referrer_
, page_state_
);
39 void FrameNavigationEntry::UpdateEntry(int64 item_sequence_number
,
40 int64 document_sequence_number
,
41 SiteInstanceImpl
* site_instance
,
43 const Referrer
& referrer
,
44 const PageState
& page_state
) {
45 item_sequence_number_
= item_sequence_number
;
46 document_sequence_number_
= document_sequence_number
;
47 site_instance_
= site_instance
;
50 page_state_
= page_state
;
53 } // namespace content