New issue
Advanced search Search tips

Issue 751025 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Team-Security-UX


Show other hotlists

Hotlists containing this issue:
EnamelAndFriendsFixIt


Sign in to add a comment

Modal permission prompts on Android appear for background or non-interactable tabs

Project Member Reported by timloh@chromium.org, Aug 1 2017

Issue description

The PermissionRequestManager takes care of showing and hiding prompts on Desktop, but on Android we have the InfoBar system and our modal dialogs manage this themselves. Modal prompts will be displayed even for tabs which are in the background, but we should queue them until the tab is actually active.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6530629aa083b54a55670125ef60f8514efbd295

commit 6530629aa083b54a55670125ef60f8514efbd295
Author: Timothy Loh <timloh@chromium.org>
Date: Tue Sep 12 05:08:55 2017

Don't show modal permission prompts for background tabs on Android

This patch fixes modal permission prompts to not appear for background
tabs on Android. Instead of having the BrowserView call into the
PermissionRequestManager on tab activation and so on, we just observe
the WasShown() and WasHidden() events.

Prompts may still show on Android when in the tab switcher, I hope to
address this in another patch.

Bug:  751025 ,  606138 
Change-Id: Ie52ca6e5985334b807dd6aa91c9f1aca94846429
Reviewed-on: https://chromium-review.googlesource.com/597507
Reviewed-by: Ben Wells <benwells@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501187}
[modify] https://crrev.com/6530629aa083b54a55670125ef60f8514efbd295/chrome/browser/permissions/permission_request_manager.cc
[modify] https://crrev.com/6530629aa083b54a55670125ef60f8514efbd295/chrome/browser/permissions/permission_request_manager.h
[modify] https://crrev.com/6530629aa083b54a55670125ef60f8514efbd295/chrome/browser/permissions/permission_request_manager_unittest.cc
[modify] https://crrev.com/6530629aa083b54a55670125ef60f8514efbd295/chrome/browser/ui/cocoa/browser_window_controller.mm
[modify] https://crrev.com/6530629aa083b54a55670125ef60f8514efbd295/chrome/browser/ui/views/frame/browser_view.cc

Comment 2 by timloh@chromium.org, Oct 20 2017

Labels: M-63
Summary: Modal permission prompts on Android appear for background or non-interactable tabs (was: Modal permission prompts on Android appear for background tabs)
A few more cases that we might want to handle, in decreasing order of importance:

- Chrome Home is half or fully open
- Omnibar is focused
- In the tab switcher
- Page info is open?
- Three dot menu is open??

Ideally these (not sure about the last two) would be covered by something like Tab.IsUserInteractable, although it seems like that only currently covers being in the tab switcher. Probably all of this logic can live on the Java side.

Comment 3 by timloh@chromium.org, Oct 23 2017

Actually, I think the omnibar being focused counts as Chrome Home being fully open.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a6e04d9a38b99858c7247da58edc43867b312447

commit a6e04d9a38b99858c7247da58edc43867b312447
Author: Timothy Loh <timloh@chromium.org>
Date: Tue Nov 07 04:54:55 2017

Modal permissions prompts shouldn't appear over Chrome Home

This patch makes us not show modal permission prompts while Chrome Home
is visible, instead delaying them until Chrome Home has been closed. If
it is closed due to a navigation, we instead dismiss the prompt, as it
would otherwise be shown only briefly and dismissed once the navigation
completes.

Bug:  751025 
Change-Id: I2a0394b27b68927f628901589c946a9348f60f2d
Reviewed-on: https://chromium-review.googlesource.com/737495
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514396}
[modify] https://crrev.com/a6e04d9a38b99858c7247da58edc43867b312447/chrome/android/java/src/org/chromium/chrome/browser/permissions/PermissionDialogController.java

Comment 5 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt

Comment 6 by timloh@chromium.org, Nov 16 2017

Status: Fixed (was: Assigned)
The patch from comment #4 deals with the Chrome Home case. The remaining cases mentioned in comment #2 I think we can leave for the tab-modal dialogs to cover (see  bug 687010  for context).

Sign in to add a comment