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

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

Issue 554743009: remove main_render_frame(), use GetMainRenderFrame() instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 3 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
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 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
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
OLDNEW
« no previous file with comments | « content/renderer/history_controller.cc ('k') | content/renderer/npapi/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698