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

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

Issue 1425303002: OOPIF: Stop using HistoryController and refactor UpdateState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit Created 5 years, 1 month 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 18 matching lines...) Expand all
29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36 #include "content/renderer/history_controller.h" 36 #include "content/renderer/history_controller.h"
37 37
38 #include "content/common/navigation_params.h" 38 #include "content/common/navigation_params.h"
39 #include "content/common/site_isolation_policy.h"
39 #include "content/renderer/render_frame_impl.h" 40 #include "content/renderer/render_frame_impl.h"
40 #include "content/renderer/render_view_impl.h" 41 #include "content/renderer/render_view_impl.h"
41 #include "third_party/WebKit/public/web/WebFrameLoadType.h" 42 #include "third_party/WebKit/public/web/WebFrameLoadType.h"
42 #include "third_party/WebKit/public/web/WebLocalFrame.h" 43 #include "third_party/WebKit/public/web/WebLocalFrame.h"
43 44
44 using blink::WebFrame; 45 using blink::WebFrame;
45 using blink::WebHistoryCommitType; 46 using blink::WebHistoryCommitType;
46 using blink::WebHistoryItem; 47 using blink::WebHistoryItem;
47 using blink::WebURLRequest; 48 using blink::WebURLRequest;
48 49
49 namespace content { 50 namespace content {
50 51
51 HistoryController::HistoryController(RenderViewImpl* render_view) 52 HistoryController::HistoryController(RenderViewImpl* render_view)
52 : render_view_(render_view) { 53 : render_view_(render_view) {
54 // We don't use HistoryController in OOPIF enabled modes.
55 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
53 } 56 }
54 57
55 HistoryController::~HistoryController() { 58 HistoryController::~HistoryController() {
56 } 59 }
57 60
58 void HistoryController::GoToEntry( 61 void HistoryController::GoToEntry(
59 blink::WebLocalFrame* main_frame, 62 blink::WebLocalFrame* main_frame,
60 scoped_ptr<HistoryEntry> target_entry, 63 scoped_ptr<HistoryEntry> target_entry,
61 scoped_ptr<NavigationParams> navigation_params, 64 scoped_ptr<NavigationParams> navigation_params,
62 WebURLRequest::CachePolicy cache_policy) { 65 WebURLRequest::CachePolicy cache_policy) {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 bool clone_children_of_target) { 235 bool clone_children_of_target) {
233 if (!current_entry_) { 236 if (!current_entry_) {
234 current_entry_.reset(new HistoryEntry(new_item)); 237 current_entry_.reset(new HistoryEntry(new_item));
235 } else { 238 } else {
236 current_entry_.reset(current_entry_->CloneAndReplace( 239 current_entry_.reset(current_entry_->CloneAndReplace(
237 new_item, clone_children_of_target, target_frame, render_view_)); 240 new_item, clone_children_of_target, target_frame, render_view_));
238 } 241 }
239 } 242 }
240 243
241 } // namespace content 244 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/history_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698