| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 HistoryController::~HistoryController() { | 53 HistoryController::~HistoryController() { |
| 54 } | 54 } |
| 55 | 55 |
| 56 void HistoryController::GoToEntry(scoped_ptr<HistoryEntry> target_entry, | 56 void HistoryController::GoToEntry(scoped_ptr<HistoryEntry> target_entry, |
| 57 WebURLRequest::CachePolicy cache_policy) { | 57 WebURLRequest::CachePolicy cache_policy) { |
| 58 HistoryFrameLoadVector same_document_loads; | 58 HistoryFrameLoadVector same_document_loads; |
| 59 HistoryFrameLoadVector different_document_loads; | 59 HistoryFrameLoadVector different_document_loads; |
| 60 | 60 |
| 61 provisional_entry_ = target_entry.Pass(); | 61 provisional_entry_ = target_entry.Pass(); |
| 62 | 62 |
| 63 WebFrame* main_frame = render_view_->main_render_frame()->GetWebFrame(); | 63 WebFrame* main_frame = render_view_->GetMainRenderFrame()->GetWebFrame(); |
| 64 if (current_entry_) { | 64 if (current_entry_) { |
| 65 RecursiveGoToEntry( | 65 RecursiveGoToEntry( |
| 66 main_frame, same_document_loads, different_document_loads); | 66 main_frame, same_document_loads, different_document_loads); |
| 67 } | 67 } |
| 68 | 68 |
| 69 if (same_document_loads.empty() && different_document_loads.empty()) { | 69 if (same_document_loads.empty() && different_document_loads.empty()) { |
| 70 // If we don't have any frames to navigate at this point, either | 70 // If we don't have any frames to navigate at this point, either |
| 71 // (1) there is no previous history entry to compare against, or | 71 // (1) there is no previous history entry to compare against, or |
| 72 // (2) we were unable to match any frames by name. In the first case, | 72 // (2) we were unable to match any frames by name. In the first case, |
| 73 // doing a different document navigation to the root item is the only valid | 73 // doing a different document navigation to the root item is the only valid |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 if (!current_entry_) { | 186 if (!current_entry_) { |
| 187 current_entry_.reset( | 187 current_entry_.reset( |
| 188 new HistoryEntry(new_item, target_frame->GetRoutingID())); | 188 new HistoryEntry(new_item, target_frame->GetRoutingID())); |
| 189 } else { | 189 } else { |
| 190 current_entry_.reset(current_entry_->CloneAndReplace( | 190 current_entry_.reset(current_entry_->CloneAndReplace( |
| 191 new_item, clone_children_of_target, target_frame, render_view_)); | 191 new_item, clone_children_of_target, target_frame, render_view_)); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace content | 195 } // namespace content |
| OLD | NEW |