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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 297973002: Navigation transitions: Block first response until after transitions have run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 0a95825d377ef661e08741cce3484062ee154631..f50141939e54cc48c9cc7a4483f0961afa57e287 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -41,6 +41,7 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/transition_request_manager.h"
#include "content/common/accessibility_messages.h"
#include "content/common/browser_plugin/browser_plugin_messages.h"
#include "content/common/content_switches_internal.h"
@@ -246,6 +247,8 @@ RenderViewHostImpl::~RenderViewHostImpl() {
CrossSiteRequestManager::GetInstance()->SetHasPendingCrossSiteRequest(
GetProcess()->GetID(), GetRoutingID(), false);
+ SetHasPendingTransitionRequest(false);
+
// If this was swapped out, it already decremented the active view
// count of the SiteInstance it belongs to.
if (IsRVHStateActive(rvh_state_))
@@ -659,6 +662,12 @@ void RenderViewHostImpl::SetHasPendingCrossSiteRequest(
GetProcess()->GetID(), GetRoutingID(), has_pending_request);
}
+void RenderViewHostImpl::SetHasPendingTransitionRequest(
+ bool has_pending_request) {
+ TransitionRequestManager::GetInstance()->SetHasPendingTransitionRequest(
+ GetProcess()->GetID(), GetRoutingID(), has_pending_request);
+}
+
void RenderViewHostImpl::SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) {
// Never grant any bindings to browser plugin guests.
if (GetProcess()->IsGuest()) {

Powered by Google App Engine
This is Rietveld 408576698