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

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

Issue 1199313006: Disable support for swapped out RenderFrame(Host) on desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 namespace content { 49 namespace content {
50 50
51 HistoryController::HistoryController(RenderViewImpl* render_view) 51 HistoryController::HistoryController(RenderViewImpl* render_view)
52 : render_view_(render_view) { 52 : render_view_(render_view) {
53 } 53 }
54 54
55 HistoryController::~HistoryController() { 55 HistoryController::~HistoryController() {
56 } 56 }
57 57
58 void HistoryController::GoToEntry( 58 void HistoryController::GoToEntry(
59 blink::WebLocalFrame* main_frame,
59 scoped_ptr<HistoryEntry> target_entry, 60 scoped_ptr<HistoryEntry> target_entry,
60 scoped_ptr<NavigationParams> navigation_params, 61 scoped_ptr<NavigationParams> navigation_params,
61 WebURLRequest::CachePolicy cache_policy) { 62 WebURLRequest::CachePolicy cache_policy) {
63 DCHECK(!main_frame->parent());
62 HistoryFrameLoadVector same_document_loads; 64 HistoryFrameLoadVector same_document_loads;
63 HistoryFrameLoadVector different_document_loads; 65 HistoryFrameLoadVector different_document_loads;
64 66
65 set_provisional_entry(target_entry.Pass()); 67 set_provisional_entry(target_entry.Pass());
66 navigation_params_ = navigation_params.Pass(); 68 navigation_params_ = navigation_params.Pass();
67 69
68 WebFrame* main_frame = render_view_->GetMainRenderFrame()->GetWebFrame();
69 if (current_entry_) { 70 if (current_entry_) {
70 RecursiveGoToEntry( 71 RecursiveGoToEntry(
71 main_frame, same_document_loads, different_document_loads); 72 main_frame, same_document_loads, different_document_loads);
72 } 73 }
73 74
74 if (same_document_loads.empty() && different_document_loads.empty()) { 75 if (same_document_loads.empty() && different_document_loads.empty()) {
75 // If we don't have any frames to navigate at this point, either 76 // If we don't have any frames to navigate at this point, either
76 // (1) there is no previous history entry to compare against, or 77 // (1) there is no previous history entry to compare against, or
77 // (2) we were unable to match any frames by name. In the first case, 78 // (2) we were unable to match any frames by name. In the first case,
78 // doing a different document navigation to the root item is the only valid 79 // doing a different document navigation to the root item is the only valid
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bool clone_children_of_target) { 228 bool clone_children_of_target) {
228 if (!current_entry_) { 229 if (!current_entry_) {
229 current_entry_.reset(new HistoryEntry(new_item)); 230 current_entry_.reset(new HistoryEntry(new_item));
230 } else { 231 } else {
231 current_entry_.reset(current_entry_->CloneAndReplace( 232 current_entry_.reset(current_entry_->CloneAndReplace(
232 new_item, clone_children_of_target, target_frame, render_view_)); 233 new_item, clone_children_of_target, target_frame, render_view_));
233 } 234 }
234 } 235 }
235 236
236 } // namespace content 237 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698