summaryrefslogtreecommitdiffstats
path: root/extensions/browser/guest_view
diff options
context:
space:
mode:
authorsammc <sammc@chromium.org>2015-11-09 19:21:19 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-10 03:22:34 +0000
commit3493265a42600578d77e75a398c0659c301c5228 (patch)
treeb52f2b3fa18eed22575c352a264784f5898f680a /extensions/browser/guest_view
parentb3bbc47e0dfd579268fdc4917ec5e6f578403eb0 (diff)
downloadchromium_src-3493265a42600578d77e75a398c0659c301c5228.zip
chromium_src-3493265a42600578d77e75a398c0659c301c5228.tar.gz
chromium_src-3493265a42600578d77e75a398c0659c301c5228.tar.bz2
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}
Diffstat (limited to 'extensions/browser/guest_view')
-rw-r--r--extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc5
1 files changed, 5 insertions, 0 deletions
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;