Commit 7060a28a authored by Maggie Cai's avatar Maggie Cai Committed by Commit Bot

[IntentHandling] Don't defer navigation when not showing bubble.

If we only want to show the intent picker icon, there is no need to
defer the navigation. This CL fixes this issue.

BUG=853604

Change-Id: I866ab67399393b634856f8e28ac0b4a17820a95b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247946Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779215}
parent 2632890c
......@@ -508,7 +508,8 @@ AppsNavigationThrottle::HandleRequest() {
return content::NavigationThrottle::CANCEL_AND_IGNORE;
// Handles apps that are automatically launched and the navigation needs to be
// cancelled.
// cancelled. This only applies on the new intent picker system, because we
// don't need to defer the navigation to find out preferred app anymore.
if (ShouldCancelNavigation(handle)) {
return content::NavigationThrottle::CANCEL_AND_IGNORE;
}
......
......@@ -274,6 +274,11 @@ bool CommonAppsNavigationThrottle::ShouldDeferNavigation(
if (apps_for_picker.empty())
return false;
if (GetPickerShowState(apps_for_picker, web_contents, url) ==
PickerShowState::kOmnibox) {
return false;
}
IntentPickerTabHelper::LoadAppIcons(
web_contents, std::move(apps_for_picker),
base::BindOnce(
......
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