Skip to content

Commit

Permalink
Do not create PermissionRequestChip in fullscreen mode.
Browse files Browse the repository at this point in the history
(cherry picked from commit 4ee270c)

Bug: 1319797,1316452,1321086
Change-Id: Ie5b66accd922f2443cf537e664d4ecbbe2866e70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3613373
Commit-Queue: Illia Klimov <elklm@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#997887}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3623902
Cr-Commit-Position: refs/branch-heads/5005@{#389}
Cr-Branched-From: 5b4d945-refs/heads/main@{#992738}
  • Loading branch information
Illia Klimov authored and Chromium LUCI CQ committed May 3, 2022
1 parent 9034cd2 commit f5c8a15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -246,6 +246,10 @@ void PermissionPromptBubbleView::SetPromptStyle(
DialogDelegate::SetCloseCallback(
base::BindOnce(&PermissionPromptBubbleView::ClosingPermission,
base::Unretained(this)));
} else if (prompt_style_ == PermissionPromptStyle::kChip ||
prompt_style_ == PermissionPromptStyle::kQuietChip) {
// Override the `CloseCallback` if it was set previously.
DialogDelegate::SetCloseCallback(base::DoNothing());
}
}

Expand Down
Expand Up @@ -274,7 +274,7 @@ void PermissionPromptImpl::SelectPwaPrompt() {

void PermissionPromptImpl::SelectNormalPrompt() {
DCHECK(!delegate_->ShouldCurrentRequestUseQuietUI());
if (ShouldCurrentRequestUseChip()) {
if (ShouldCurrentRequestUseChip() && IsLocationBarDisplayed()) {
ShowChip();
} else {
ShowBubble();
Expand Down

0 comments on commit f5c8a15

Please sign in to comment.