Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Issue 2770423002: Do not show permission bubble when browser is not active (Closed)

Created:
3 years, 9 months ago by Qiang(Joe) Xu
Modified:
3 years, 7 months ago
CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, raymes+watch_chromium.org, tfarina
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not show permission bubble when browser is not active Changes: Right now, the permission request is added when active tab changed and bubble showing is scheduled when DocumentOnLoadCompletedInMainFrame and DocumentLoadedInFrame. There is nothing to do whether the container browser is active or not. This change is to fix that: do not trigger showing bubble when browser is not active, and schedule showing bubble when browser becomes active if there are still pending requests. BUG=704350 TEST=test reporter's bug case, it is fixed.

Patch Set 1 #

Total comments: 2

Patch Set 2 : BrowserListObserver #

Total comments: 3

Patch Set 3 : feedback #

Patch Set 4 : mac tests #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -1 line) Patch
M chrome/browser/permissions/permission_request_manager.h View 1 2 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/permissions/permission_request_manager.cc View 1 2 3 4 5 chunks +27 lines, -0 lines 0 comments Download

Messages

Total messages: 92 (67 generated)
Qiang(Joe) Xu
Hi all, PTAL, thanks! This fix is only dealing with browser window. mlamouri@, are there ...
3 years, 9 months ago (2017-03-25 01:38:36 UTC) #7
sky
https://codereview.chromium.org/2770423002/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2770423002/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1824 chrome/browser/ui/views/frame/browser_view.cc:1824: void BrowserView::OnWidgetVisibilityChanged(views::Widget* widget, I think this logic belongs closer ...
3 years, 9 months ago (2017-03-27 15:47:51 UTC) #8
Qiang(Joe) Xu
HI, PTAL, thanks! https://codereview.chromium.org/2770423002/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2770423002/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1824 chrome/browser/ui/views/frame/browser_view.cc:1824: void BrowserView::OnWidgetVisibilityChanged(views::Widget* widget, On 2017/03/27 15:47:51, ...
3 years, 9 months ago (2017-03-27 21:09:52 UTC) #12
sky
https://codereview.chromium.org/2770423002/diff/40001/chrome/browser/permissions/permission_request_manager.cc File chrome/browser/permissions/permission_request_manager.cc (right): https://codereview.chromium.org/2770423002/diff/40001/chrome/browser/permissions/permission_request_manager.cc#newcode84 chrome/browser/permissions/permission_request_manager.cc:84: browser_active_(false), Why do you need to cache browser_active_ ? ...
3 years, 9 months ago (2017-03-27 22:43:45 UTC) #13
mlamouri (slow - plz ping)
Can you use WebContentsObserver callbacks? I assume that when the browser isn't active/in the background ...
3 years, 8 months ago (2017-03-30 13:23:04 UTC) #57
Qiang(Joe) Xu
On 2017/03/30 13:23:04, mlamouri wrote: > Can you use WebContentsObserver callbacks? I assume that when ...
3 years, 8 months ago (2017-03-30 18:55:07 UTC) #59
mlamouri (slow - plz ping)
On 2017/03/30 at 18:55:07, warx wrote: > On 2017/03/30 13:23:04, mlamouri wrote: > > Can ...
3 years, 8 months ago (2017-03-30 20:49:53 UTC) #60
Qiang(Joe) Xu
On 2017/03/30 20:49:53, mlamouri wrote: > On 2017/03/30 at 18:55:07, warx wrote: > > On ...
3 years, 8 months ago (2017-03-30 20:57:22 UTC) #61
sky
On 2017/03/30 20:49:53, mlamouri wrote: > On 2017/03/30 at 18:55:07, warx wrote: > > On ...
3 years, 8 months ago (2017-03-31 04:27:54 UTC) #62
sky
On 2017/03/31 04:27:54, sky wrote: > On 2017/03/30 20:49:53, mlamouri wrote: > > On 2017/03/30 ...
3 years, 8 months ago (2017-03-31 04:28:23 UTC) #63
mlamouri (slow - plz ping)
On 2017/03/31 at 04:27:54, sky wrote: > On 2017/03/30 20:49:53, mlamouri wrote: > > On ...
3 years, 8 months ago (2017-03-31 08:22:49 UTC) #64
sky
Not necessarily. For example, if focus is on the omnibox then the active webcontents in ...
3 years, 8 months ago (2017-03-31 14:26:35 UTC) #65
raymes
FYI dominickn and timloh (who are doing some permission prompt code refactoring)
3 years, 8 months ago (2017-04-02 22:31:56 UTC) #78
Qiang(Joe) Xu
I am stucked in tests for some time. Right now, most of the permissionprompt in ...
3 years, 8 months ago (2017-04-06 22:22:51 UTC) #81
sky
I'm not familiar with the tests for this code. If there are locks of mocks, ...
3 years, 8 months ago (2017-04-07 14:17:28 UTC) #82
Timothy Loh
Does this bug occur on platforms other than crOS? I wonder if it makes more ...
3 years, 8 months ago (2017-04-11 03:56:55 UTC) #83
Qiang(Joe) Xu
On 2017/04/11 03:56:55, Timothy Loh wrote: > Does this bug occur on platforms other than ...
3 years, 8 months ago (2017-04-11 05:43:26 UTC) #84
sky
On 2017/04/11 05:43:26, Qiang(Joe) Xu wrote: > On 2017/04/11 03:56:55, Timothy Loh wrote: > > ...
3 years, 8 months ago (2017-04-11 16:47:57 UTC) #85
raymes
On 2017/04/11 16:47:57, sky wrote: > On 2017/04/11 05:43:26, Qiang(Joe) Xu wrote: > > On ...
3 years, 8 months ago (2017-04-12 00:07:09 UTC) #86
sky
Doesn't have focus. This could mean another chrome window, or possibly another application has focus. ...
3 years, 8 months ago (2017-04-12 03:40:30 UTC) #87
raymes
On 2017/04/12 03:40:30, sky wrote: > Doesn't have focus. This could mean another chrome window, ...
3 years, 8 months ago (2017-04-12 05:46:11 UTC) #88
mlamouri (slow - plz ping)
On 2017/04/12 at 05:46:11, raymes wrote: > On 2017/04/12 03:40:30, sky wrote: > > Doesn't ...
3 years, 8 months ago (2017-04-12 15:39:19 UTC) #89
sky
On 2017/04/12 15:39:19, mlamouri wrote: > On 2017/04/12 at 05:46:11, raymes wrote: > > On ...
3 years, 8 months ago (2017-04-12 15:49:46 UTC) #90
Qiang(Joe) Xu
On 2017/04/12 15:49:46, sky wrote: > On 2017/04/12 15:39:19, mlamouri wrote: > > On 2017/04/12 ...
3 years, 7 months ago (2017-05-05 17:34:46 UTC) #91
sky
3 years, 7 months ago (2017-05-05 17:46:41 UTC) #92
Message was sent while issue was closed.
Good job for getting to the root of the problem!

On Fri, May 5, 2017 at 10:34 AM, <warx@chromium.org> wrote:

> On 2017/04/12 15:49:46, sky wrote:
> > On 2017/04/12 15:39:19, mlamouri wrote:
> > > On 2017/04/12 at 05:46:11, raymes wrote:
> > > > On 2017/04/12 03:40:30, sky wrote:
> > > > > Doesn't have focus. This could mean another chrome window, or
> possibly
> > > > > another application has focus.
> > > > >
> > > > > -Scott
> > > > >
> > > > > On Tue, Apr 11, 2017 at 5:07 PM, <mailto:raymes@chromium.org>
> wrote:
> > > > >
> > > > > > On 2017/04/11 16:47:57, sky wrote:
> > > > > > > On 2017/04/11 05:43:26, Qiang(Joe) Xu wrote:
> > > > > > > > On 2017/04/11 03:56:55, Timothy Loh wrote:
> > > > > > > > > Does this bug occur on platforms other than crOS? I wonder
> if it
> > > > > > makes
> > > > > > more
> > > > > > > > > sense to push this down into the relevant PermissionPrompt
> > subclass
> > > > > > instead
> > > > > > > of
> > > > > > > > > adding more #if's into the PermissionRequestManager.
> > > > > > > >
> > > > > > > > Permission shown on desktop (reporter's bug, that means
> showing on
> > > > > > invisible
> > > > > > > > browser window) is Chrome OS only.
> > > > > > > > But permission bubble shown on inactive browser window is
> common
> on
> > > all
> > > > > > > > platforms. I started thinking that maybe
> > > > > > > > permission bubble shown on inactive window is not a bad
> thing. It
> is
> > > > > > just
> > > > > > > > silently showing there, which doesn't cause
> > > > > > > > any UI bad look. sky@, what do you think?
> > > > > > >
> > > > > > > IMO that results in a bad UI. Why would we want to show the
> bubble
> if
> > > the
> > > > > > > browser isn't active?
> > > > > >
> > > > > > What does it mean for the browser not to be "active"? Does it
> mean
> that
> > > the
> > > > > > window is minimized, or doesn't have focus?
> > > > > >
> > > > > > https://codereview.chromium.org/2770423002/
> > > > > >
> > > > >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> Groups
> > > > > "Chromium-reviews" group.
> > > > > To unsubscribe from this group and stop receiving emails from it,
> send
> an
> > > email
> > > > > to mailto:chromium-reviews+unsubscribe@chromium.org.
> > > >
> > > > Hmm I see - yeah I guess I don't feel too strongly about that. It
> doesn't
> > seem
> > > too problematic to me if a prompt shows up on a window that doesn't
> have
> > focus,
> > > but I'm not a UX expert :)
> > >
> > > IMO, if a tab is visible to the user and shows a prompt it might not
> be that
> > > weird. However, coming back to a tab that was visible that will then
> ask for
> a
> > > permission might look a bit agressive. This said, you might want to
> check
> with
> > a
> > > UX person :)
> >
> > I do agree. We should run this by UX for their thoughts. Warx@, can you
> do
> that?
> > kuscher is likely a good one to ask.
>
> I am closing this issue. The root cause on Chrome OS platform is found and
> tracked in a
> separate CL: https://codereview.chromium.org/2859333003/.
>
> Thanks for everyone's input on this thread, appreciate it!
>
> https://codereview.chromium.org/2770423002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698