Commit 0b182029 authored by Patrick Noland's avatar Patrick Noland Committed by Commit Bot

[ToolbarMVC] Loosen conditions for calling onNavigatedToDifferentPage

In https://crrev.com/c/2076402/ I removed a call to setTitleToPageTitle
in onTabClosed, and inadvertently failed to replace it.
Rather than replacing it directly, I think it's better to call
onNavigatedToDifferentPage instead. This calls setTitleToPageTitle but
also updates the status icon and re-checks the TITLE_ONLY state.

For context, the check for getWebContents().isLoadingToDifferentDocument()
was introduced to fix a hera (tabs in the Android launcher) bug in this
internal cl: https://crrev.com/i/182069
I don't think this is really relevant any longer, since Hera is long gone, but I will happily re-purpose it.

Bug: 1061356
Change-Id: I9b3e8ad675a022ba1da2e2409ee6dab96775e058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2105396Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750582}
parent 330b8d4f
...@@ -1643,8 +1643,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF ...@@ -1643,8 +1643,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF
mToolbar.onTabOrModelChanged(); mToolbar.onTabOrModelChanged();
if (tab != null && tab.getWebContents() != null if (tab != null) {
&& tab.getWebContents().isLoadingToDifferentDocument()) {
mToolbar.onNavigatedToDifferentPage(); mToolbar.onNavigatedToDifferentPage();
} }
......
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