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

Unified Diff: content/renderer/history_controller.cc

Issue 1693353002: Reland #2 Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits + rebase Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/history_controller.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/history_controller.cc
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc
index cff9214abd31bde4167a2fe22708921d044bfedf..e459d9a3f7c1722f4ec68424c162ea9068c5cbf0 100644
--- a/content/renderer/history_controller.cc
+++ b/content/renderer/history_controller.cc
@@ -60,7 +60,7 @@ HistoryController::HistoryController(RenderViewImpl* render_view)
HistoryController::~HistoryController() {
}
-void HistoryController::GoToEntry(
+bool HistoryController::GoToEntry(
blink::WebLocalFrame* main_frame,
scoped_ptr<HistoryEntry> target_entry,
scoped_ptr<NavigationParams> navigation_params,
@@ -89,6 +89,7 @@ void HistoryController::GoToEntry(
std::make_pair(main_frame, provisional_entry_->root()));
}
+ bool has_main_frame_request = false;
for (const auto& item : same_document_loads) {
WebFrame* frame = item.first;
RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame);
@@ -101,6 +102,8 @@ void HistoryController::GoToEntry(
frame->toWebLocalFrame()->load(
request, blink::WebFrameLoadType::BackForward, item.second,
blink::WebHistorySameDocumentLoad);
+ if (frame == main_frame)
+ has_main_frame_request = true;
}
for (const auto& item : different_document_loads) {
WebFrame* frame = item.first;
@@ -114,7 +117,11 @@ void HistoryController::GoToEntry(
frame->toWebLocalFrame()->load(
request, blink::WebFrameLoadType::BackForward, item.second,
blink::WebHistoryDifferentDocumentLoad);
+ if (frame == main_frame)
+ has_main_frame_request = true;
}
+
+ return has_main_frame_request;
}
void HistoryController::RecursiveGoToEntry(
« no previous file with comments | « content/renderer/history_controller.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698