From 3493265a42600578d77e75a398c0659c301c5228 Mon Sep 17 00:00:00 2001 From: sammc Date: Mon, 9 Nov 2015 19:21:19 -0800 Subject: MimeHandlerViewGuest: Ignore title changes due to navigations. Currently, when a mime handler is loaded, the URL of the mime handler is used as the embedder's title. This causes that title to flicker between the URL of the content, the URL of the mime handler and the title set by the mime handler. This changes MimeHandlerViewGuest to only update the embedder's title when the mime handler's title changes without the URL also changing. BUG=47914 Review URL: https://codereview.chromium.org/1431713004 Cr-Commit-Position: refs/heads/master@{#358778} --- .../browser/guest_view/mime_handler_view/mime_handler_view_guest.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'extensions') diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc index 55b2426..1f9ebfb 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc @@ -169,6 +169,11 @@ void MimeHandlerViewGuest::NavigationStateChanged( if (!(changed_flags & content::INVALIDATE_TYPE_TITLE)) return; + // Only consider title changes not triggered by URL changes. Otherwise, the + // URL of the mime handler will be displayed. + if (changed_flags & content::INVALIDATE_TYPE_URL) + return; + if (!is_full_page_plugin()) return; -- cgit v1.1