Discussion:
Issue 423770 in chromium: Remove user_gesture bit from permission requests messages
c***@googlecode.com
2014-10-15 15:33:21 UTC
Permalink
Comment #2 on issue 423770 by ***@chromium.org: Remove user_gesture bit
from permission requests messages
https://code.google.com/p/chromium/issues/detail?id=423770

Some information to get started.

user_gesture is only used on bubbles so make sure you enable them before
getting to any conclusion.

I asked the original implementor of the bubble what was all this for and
this was his reply.

Me: The implementation receives a user_gesture parameter which is used to
decide when to show the bubble. If it's false it does not seem to be
triggering the bubble immediately but after some other actions performed
which is confusing.

This is only made worse by the fact that user_gesture seems to be fed from
blink via blink::WebUserGestureIndicator::isProcessingUserGesture() which I
assumed would be true if you are for example requesting the permission as a
result of clicking a button. However this does not seem to be working as
expected (In fact I have not yet managed to trigger user_gesture to true).
Is this the right way of feeding the user_gesture variable?


Greg: The goal is that JS gets a crack at page load to issue a permission
request. If it doesn't happen then, they need a user gesture. There could
definitely be holes there depending on how much shenanigans blink does
before sending us the API call (basically invalidating
isProcessingUserGesture).
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-10-15 16:33:22 UTC
Permalink
Updates:
Cc: ***@chromium.org

Comment #3 on issue 423770 by ***@chromium.org: Remove user_gesture
bit from permission requests messages
https://code.google.com/p/chromium/issues/detail?id=423770

+gbillock@

Greg, wouldn't that be doable to do that check in the renderer process? We
could delay the permission request until page load from there and simply
drop requests that are made after page load too.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-11-02 20:36:50 UTC
Permalink
Comment #6 on issue 423770 by ***@chromium.org: Remove user_gesture
bit from permission requests messages
https://code.google.com/p/chromium/issues/detail?id=423770

Greg, what do you think of this plan:
- we create a new content switch to have a different permission request
behaviour depending on whether they came from a user gesture;
- that content switch would be enabled automatically when the permission
bubble chrome switch would be enabled;
- on the renderer side, any permission request after page load that isn't
coming with a user gesture will fail;
- on the renderer side, any permission request before page load that isn't
coming with a user gesture will be delayed until the page is loaded, it
which point all requests will be sent to the browser process;
- the permission bubble will not be shown immediately when a request is
received but will do so at the next event loop so it can merge permission
requests that are meant to be shown together.

Also, FTR, isProcessingUserGesture() actually works even though I had
trouble to get the feature to work. I think the problem is that the
permission bubble manager doesn't correctly notifies the renderer that a
permission request was dropped, thus the geolocation code merges different
calls to the same permission prompt that is pending even though it was
actually denied.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-11-04 05:48:54 UTC
Permalink
Comment #8 on issue 423770 by ***@chromium.org: Remove user_gesture
bit from permission requests messages
https://code.google.com/p/chromium/issues/detail?id=423770

From my latest experiments with permission-bubbles the behavior seems to be
as follows:

doc loaded
user_gesture !loaded loaded
----------------------------------------------
false show when loaded* drop (!)
true show when loaded* show asap

*coalesce permissions into one bubble.

This is a bit strange as we drop requests when a page is loaded and there
is no user gesture: i.e. doing something like
setTimeout(requestGeolocation, 5000) does not trigger a bubble. Not sure if
this is the intended behavior (Greg?).

Infobars (which are currently the default) do not care about user_gesture
or doc loaded. They are simply displayed as they come in.

So looking at the current bubble implementation we could drop the
user_gesture parameter and simulate the "dropping" of permission requests
in the renderer. The coalesced permission bubble would still be handled by
the DocumentOnLoadCompleted method in the browser.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2015-10-20 14:20:48 UTC
Permalink
Updates:
Owner: ***@chromium.org
Labels: -Cr-Internals-Core Cr-Internals-Permissions OS-Linux

Comment #12 on issue 423770 by ***@chromium.org: Remove user_gesture
bit from permission requests messages
https://code.google.com/p/chromium/issues/detail?id=423770

(No comment was entered for this change.)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2016-02-17 09:59:57 UTC
Permalink
Comment #14 on issue 423770 by ***@chromium.org: Remove user_gesture
bit from permission requests messages
https://code.google.com/p/chromium/issues/detail?id=423770#c14

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940

commit a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940
Author: mlamouri <***@chromium.org>
Date: Wed Feb 17 09:54:11 2016

Remove user gesture bit from PermissionContext code.

This CL removes the user gesture bit from PermissionContext and all its sub
classes.

The user gesture information was required by the permission bubble code.
With bug 545476
fixed, this is no longer needed.

This CL is the first CL in a suite of three CL that remove the passing of
the user gesture
information from the renderer process content layer to the browser process
chrome layer:
1. <this>
2. https://codereview.chromium.org/1695953002
3. https://codereview.chromium.org/1696883004

BUG=423770

Review URL: https://codereview.chromium.org/1695943002

Cr-Commit-Position: refs/heads/master@{#375839}

[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/geolocation/geolocation_permission_context.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/geolocation/geolocation_permission_context.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/geolocation/geolocation_permission_context_android.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/geolocation/geolocation_permission_context_android.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/geolocation/geolocation_permission_context_extensions.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/geolocation/geolocation_permission_context_extensions.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/media/media_stream_device_permission_context.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/media/media_stream_device_permission_context.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/media/midi_permission_context_unittest.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/media/protected_media_identifier_permission_context.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/media/protected_media_identifier_permission_context.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/notifications/notification_permission_context.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/notifications/notification_permission_context.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/notifications/notification_permission_context_unittest.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/permissions/permission_context_base.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/permissions/permission_context_base.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/permissions/permission_context_base_unittest.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/permissions/permission_manager.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/push_messaging/push_messaging_permission_context.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/push_messaging/push_messaging_permission_context.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/storage/durable_storage_permission_context.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/chrome/browser/storage/durable_storage_permission_context.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/extensions/browser/guest_view/web_view/web_view_permission_helper.cc
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/extensions/browser/guest_view/web_view/web_view_permission_helper.h
[modify]
http://crrev.com/a8e32b6fc3a4696ba24c8d6f257ec3fe848cf940/extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

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