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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 #include <utility> | 38 #include <utility> |
39 | 39 |
40 #include "content/common/navigation_params.h" | 40 #include "content/common/navigation_params.h" |
41 #include "content/common/site_isolation_policy.h" | 41 #include "content/common/site_isolation_policy.h" |
42 #include "content/renderer/render_frame_impl.h" | 42 #include "content/renderer/render_frame_impl.h" |
43 #include "content/renderer/render_view_impl.h" | 43 #include "content/renderer/render_view_impl.h" |
44 #include "third_party/WebKit/public/web/WebFrameLoadType.h" | 44 #include "third_party/WebKit/public/web/WebFrameLoadType.h" |
45 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 45 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
46 | 46 |
| 47 using blink::WebCachePolicy; |
47 using blink::WebFrame; | 48 using blink::WebFrame; |
48 using blink::WebHistoryCommitType; | 49 using blink::WebHistoryCommitType; |
49 using blink::WebHistoryItem; | 50 using blink::WebHistoryItem; |
50 using blink::WebURLRequest; | 51 using blink::WebURLRequest; |
51 | 52 |
52 namespace content { | 53 namespace content { |
53 | 54 |
54 HistoryController::HistoryController(RenderViewImpl* render_view) | 55 HistoryController::HistoryController(RenderViewImpl* render_view) |
55 : render_view_(render_view) { | 56 : render_view_(render_view) { |
56 // We don't use HistoryController in OOPIF enabled modes. | 57 // We don't use HistoryController in OOPIF enabled modes. |
57 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); | 58 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); |
58 } | 59 } |
59 | 60 |
60 HistoryController::~HistoryController() { | 61 HistoryController::~HistoryController() { |
61 } | 62 } |
62 | 63 |
63 bool HistoryController::GoToEntry( | 64 bool HistoryController::GoToEntry( |
64 blink::WebLocalFrame* main_frame, | 65 blink::WebLocalFrame* main_frame, |
65 scoped_ptr<HistoryEntry> target_entry, | 66 scoped_ptr<HistoryEntry> target_entry, |
66 scoped_ptr<NavigationParams> navigation_params, | 67 scoped_ptr<NavigationParams> navigation_params, |
67 WebURLRequest::CachePolicy cache_policy) { | 68 WebCachePolicy cache_policy) { |
68 DCHECK(!main_frame->parent()); | 69 DCHECK(!main_frame->parent()); |
69 HistoryFrameLoadVector same_document_loads; | 70 HistoryFrameLoadVector same_document_loads; |
70 HistoryFrameLoadVector different_document_loads; | 71 HistoryFrameLoadVector different_document_loads; |
71 | 72 |
72 set_provisional_entry(std::move(target_entry)); | 73 set_provisional_entry(std::move(target_entry)); |
73 navigation_params_ = std::move(navigation_params); | 74 navigation_params_ = std::move(navigation_params); |
74 | 75 |
75 if (current_entry_) { | 76 if (current_entry_) { |
76 RecursiveGoToEntry( | 77 RecursiveGoToEntry( |
77 main_frame, same_document_loads, different_document_loads); | 78 main_frame, same_document_loads, different_document_loads); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 bool clone_children_of_target) { | 249 bool clone_children_of_target) { |
249 if (!current_entry_) { | 250 if (!current_entry_) { |
250 current_entry_.reset(new HistoryEntry(new_item)); | 251 current_entry_.reset(new HistoryEntry(new_item)); |
251 } else { | 252 } else { |
252 current_entry_.reset(current_entry_->CloneAndReplace( | 253 current_entry_.reset(current_entry_->CloneAndReplace( |
253 new_item, clone_children_of_target, target_frame, render_view_)); | 254 new_item, clone_children_of_target, target_frame, render_view_)); |
254 } | 255 } |
255 } | 256 } |
256 | 257 |
257 } // namespace content | 258 } // namespace content |
OLD | NEW |