Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / browser / frame_host / frame_navigation_entry.cc
blob77245990768abf02851a693eb53149d8f87fc11a
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"
7 namespace content {
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,
19 const GURL& url,
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),
25 url_(url),
26 referrer_(referrer) {
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_);
36 return copy;
39 void FrameNavigationEntry::UpdateEntry(int64 item_sequence_number,
40 int64 document_sequence_number,
41 SiteInstanceImpl* site_instance,
42 const GURL& url,
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;
48 url_ = url;
49 referrer_ = referrer;
50 page_state_ = page_state;
53 } // namespace content