Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: content/renderer/history_entry.h

Issue 281653003: DRAFT CL: Add FrameNavigationEntry and track subframe session histories. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/history_controller.cc ('k') | content/renderer/history_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void set_item(const blink::WebHistoryItem& item); 72 void set_item(const blink::WebHistoryItem& item);
73 std::vector<HistoryNode*>& children() const { return children_->get(); } 73 std::vector<HistoryNode*>& children() const { return children_->get(); }
74 void RemoveChildren(); 74 void RemoveChildren();
75 75
76 private: 76 private:
77 HistoryEntry* entry_; 77 HistoryEntry* entry_;
78 scoped_ptr<ScopedVector<HistoryNode> > children_; 78 scoped_ptr<ScopedVector<HistoryNode> > children_;
79 blink::WebHistoryItem item_; 79 blink::WebHistoryItem item_;
80 }; 80 };
81 81
82 // TODO(creis): Temporary hack to update RenderFrame routing ID -> FSN map
83 // when RenderFrames swap to RenderFrameProxies and back. Remove when we
84 // don't need HistoryEntry anymore.
85 static void UpdateFrameMap(uint64_t old_routing_id, uint64_t new_routing_id);
86
82 HistoryEntry(const blink::WebHistoryItem& root, int64_t frame_id); 87 HistoryEntry(const blink::WebHistoryItem& root, int64_t frame_id);
83 HistoryEntry(); 88 HistoryEntry();
84 ~HistoryEntry(); 89 ~HistoryEntry();
85 90
86 HistoryEntry* CloneAndReplace(const blink::WebHistoryItem& newItem, 91 HistoryEntry* CloneAndReplace(const blink::WebHistoryItem& newItem,
87 bool clone_children_of_target, 92 bool clone_children_of_target,
88 RenderFrameImpl* target_frame, 93 RenderFrameImpl* target_frame,
89 RenderViewImpl* render_view); 94 RenderViewImpl* render_view);
90 95
91 HistoryNode* GetHistoryNodeForFrame(RenderFrameImpl* frame); 96 HistoryNode* GetHistoryNodeForFrame(RenderFrameImpl* frame);
92 blink::WebHistoryItem GetItemForFrame(RenderFrameImpl* frame); 97 blink::WebHistoryItem GetItemForFrame(RenderFrameImpl* frame);
93 const blink::WebHistoryItem& root() const { return root_->item(); } 98 const blink::WebHistoryItem& root() const { return root_->item(); }
94 HistoryNode* root_history_node() const { return root_.get(); } 99 HistoryNode* root_history_node() const { return root_.get(); }
95 100
96 private: 101 private:
97 102
98 scoped_ptr<HistoryNode> root_; 103 scoped_ptr<HistoryNode> root_;
99 104
100 typedef base::hash_map<uint64_t, HistoryNode*> FramesToItems; 105 typedef base::hash_map<uint64_t, HistoryNode*> FramesToItems;
101 FramesToItems frames_to_items_; 106 FramesToItems frames_to_items_;
102 107
103 typedef base::hash_map<std::string, HistoryNode*> UniqueNamesToItems; 108 typedef base::hash_map<std::string, HistoryNode*> UniqueNamesToItems;
104 UniqueNamesToItems unique_names_to_items_; 109 UniqueNamesToItems unique_names_to_items_;
105 }; 110 };
106 111
107 } // namespace content 112 } // namespace content
108 113
109 #endif // CONTENT_RENDERER_HISTORY_ENTRY_H_ 114 #endif // CONTENT_RENDERER_HISTORY_ENTRY_H_
OLDNEW
« no previous file with comments | « content/renderer/history_controller.cc ('k') | content/renderer/history_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698