Commit 85092cd8 authored by rbpotter's avatar rbpotter Committed by Commit bot

Fix print preview close in gmail.

Print preview closed in gmail when gmail navigated to a new
URL fragment. This occurred if print preview was requested
just after making changes to an e-mail draft in a compose
message window. Added check that will ensure print preview
remains open in this case.

BUG= 614998

Review-Url: https://codereview.chromium.org/2201543002
Cr-Commit-Position: refs/heads/master@{#408860}
parent b13b5d87
......@@ -347,6 +347,14 @@ void PrintPreviewDialogController::OnNavEntryCommitted(
NOTREACHED();
return;
}
if (details) {
ui::PageTransition type = details->entry->GetTransitionType();
content::NavigationType nav_type = details->type;
if (nav_type == content::NAVIGATION_TYPE_EXISTING_PAGE &&
(ui::PageTransitionCoreTypeIs(type, ui::PAGE_TRANSITION_TYPED) ||
ui::PageTransitionCoreTypeIs(type, ui::PAGE_TRANSITION_LINK)))
return;
}
RemoveInitiator(contents);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment