OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |