| 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 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 HistoryEntry* HistoryEntry::CloneAndReplace(const WebHistoryItem& new_item, | 182 HistoryEntry* HistoryEntry::CloneAndReplace(const WebHistoryItem& new_item, |
| 183 bool clone_children_of_target, | 183 bool clone_children_of_target, |
| 184 RenderFrameImpl* target_frame, | 184 RenderFrameImpl* target_frame, |
| 185 RenderViewImpl* render_view) { | 185 RenderViewImpl* render_view) { |
| 186 HistoryEntry* new_entry = new HistoryEntry(); | 186 HistoryEntry* new_entry = new HistoryEntry(); |
| 187 new_entry->root_.reset( | 187 new_entry->root_.reset( |
| 188 root_->CloneAndReplace(new_entry, | 188 root_->CloneAndReplace(new_entry, |
| 189 new_item, | 189 new_item, |
| 190 clone_children_of_target, | 190 clone_children_of_target, |
| 191 target_frame, | 191 target_frame, |
| 192 render_view->main_render_frame())); | 192 render_view->GetMainRenderFrame())); |
| 193 return new_entry; | 193 return new_entry; |
| 194 } | 194 } |
| 195 | 195 |
| 196 HistoryEntry::HistoryNode* HistoryEntry::GetHistoryNodeForFrame( | 196 HistoryEntry::HistoryNode* HistoryEntry::GetHistoryNodeForFrame( |
| 197 RenderFrameImpl* frame) { | 197 RenderFrameImpl* frame) { |
| 198 if (HistoryNode* history_node = | 198 if (HistoryNode* history_node = |
| 199 frames_to_items_[GetFrameMap()[frame->GetRoutingID()]]) | 199 frames_to_items_[GetFrameMap()[frame->GetRoutingID()]]) |
| 200 return history_node; | 200 return history_node; |
| 201 return unique_names_to_items_[frame->GetWebFrame()->uniqueName().utf8()]; | 201 return unique_names_to_items_[frame->GetWebFrame()->uniqueName().utf8()]; |
| 202 } | 202 } |
| 203 | 203 |
| 204 WebHistoryItem HistoryEntry::GetItemForFrame(RenderFrameImpl* frame) { | 204 WebHistoryItem HistoryEntry::GetItemForFrame(RenderFrameImpl* frame) { |
| 205 if (HistoryNode* history_node = GetHistoryNodeForFrame(frame)) | 205 if (HistoryNode* history_node = GetHistoryNodeForFrame(frame)) |
| 206 return history_node->item(); | 206 return history_node->item(); |
| 207 return WebHistoryItem(); | 207 return WebHistoryItem(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace content | 210 } // namespace content |
| OLD | NEW |