|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by dominickn Modified:
4 years, 1 month ago CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, feature-media-reviews_chromium.org, jam, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, chrome-apps-syd-reviews_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionImplement modal permission prompts for media permissions on Android.
This CL adds support for camera and microphone permission requests on
Android using a modal dialog prompt. This is controlled by the
ModalPermissionPrompts feature, which is disabled by default. The
intention is to test this new prompt to a small percentage of users to
determine its effectiveness in improving the overall permissions request
flow.
This follows crrev.com/2446063002, which implements the modal dialog
for all other permissions on Android.
Currently, modal prompts use a PermissionDialogDelegate, which wraps the
PermissionInfoBarDelegate class and allows the Java-side dialog UI to
communicate with the native C++ permissions layer.
Upcoming refactoring work will eliminate the per-permission
InfoBarDelegate classes, and simply allow the generic
PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object
which will provide all permission-specific data. At that point,
PermissionDialogDelegate will also change to analogously wrap
PermissionPromptAndroid.
New Android media permissions UI tests are introduced to test the modal
dialogs under various configurations, including with and without the
optional persistence toggle.
BUG=658125
Committed: https://crrev.com/c70672a6e41ed5fa46bee5df7f0bdc99cbbf0476
Cr-Commit-Position: refs/heads/master@{#431142}
Patch Set 1 #Patch Set 2 : Rebase #
Total comments: 6
Patch Set 3 : Nits #
Total comments: 6
Patch Set 4 : Nits #
Dependent Patchsets: Messages
Total messages: 32 (20 generated)
The CQ bit was checked by dominickn@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, and by default requires the permission to be requested with a user gesture. Currently, modal prompts use a PermissionDialogDelegate, which wraps the per-permission MediaStreamInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 ========== to ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, and by default requires the permission to be requested with a user gesture. This follows crrev.com/2446063002, which implements the modal dialog for all other permissions on Android. Currently, modal prompts use a PermissionDialogDelegate, which wraps the PermissionInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 ==========
dominickn@chromium.org changed reviewers: + dfalcantara@chromium.org, raymes@chromium.org, xhwang@chromium.org
Description was changed from ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, and by default requires the permission to be requested with a user gesture. This follows crrev.com/2446063002, which implements the modal dialog for all other permissions on Android. Currently, modal prompts use a PermissionDialogDelegate, which wraps the PermissionInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 ========== to ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, which is disabled by default. The intention is to test this new prompt to a small percentage of users to determine its effectiveness in improving the overall permissions request flow. This follows crrev.com/2446063002, which implements the modal dialog for all other permissions on Android. Currently, modal prompts use a PermissionDialogDelegate, which wraps the PermissionInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 ==========
dfalcantara: PTAL at MediaTest.java xhwang: PTAL at media/ raymes: PTAL at permissions Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2462963002/diff/20001/chrome/android/javatest... File chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java (right): https://codereview.chromium.org/2462963002/diff/20001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:45: "Mic count:", "initiate_getMicrophone()", 1, false, false, false, false); All these bools arguments are a little confusing - in C++ we would typically annotate them with the argument name though I'm not sure if there is an equivalent thing for Java so I'll leave it up to the Java folks :) https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/media/we... File chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc (right): https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/media/we... chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc:196: PermissionDialogDelegate::CreateMediaStreamDialog(web_contents, Hmm - there seems to be some logic in MediaStreamInfoBarDelegateAndroid::Create that may be important: if (!infobar_service) { // Deny the request if there is no place to show the infobar, e.g. when // the request comes from a background extension page. controller->Cancelled(); return false; } We may need to keep this logic? https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/permissi... File chrome/browser/permissions/permission_dialog_delegate.h (right): https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/permissi... chrome/browser/permissions/permission_dialog_delegate.h:51: // TODO: remove this when media stream requests are eventually folded in with nit: Please add yourself as the TODO(author). Having yourself in a TODO doesn't mean that you have to be the one to fix it, it just means that your are the one who knows something about it.
xhwang@chromium.org changed reviewers: + sergeyu@chromium.org - xhwang@chromium.org
xhwang -> sergeyu who is the webrtc owner
https://codereview.chromium.org/2462963002/diff/20001/chrome/android/javatest... File chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java (right): https://codereview.chromium.org/2462963002/diff/20001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:45: "Mic count:", "initiate_getMicrophone()", 1, false, false, false, false); On 2016/11/02 08:09:03, raymes wrote: > All these bools arguments are a little confusing - in C++ we would typically > annotate them with the argument name though I'm not sure if there is an > equivalent thing for Java so I'll leave it up to the Java folks :) Acknowledged. https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/media/we... File chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc (right): https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/media/we... chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc:196: PermissionDialogDelegate::CreateMediaStreamDialog(web_contents, On 2016/11/02 08:09:04, raymes wrote: > Hmm - there seems to be some logic in MediaStreamInfoBarDelegateAndroid::Create > that may be important: > > if (!infobar_service) { > // Deny the request if there is no place to show the infobar, e.g. when > // the request comes from a background extension page. > controller->Cancelled(); > return false; > } > > We may need to keep this logic? I don't think it's possible for anything except a real tab to request this permission on Android (e.g. there are no extensions). https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/permissi... File chrome/browser/permissions/permission_dialog_delegate.h (right): https://codereview.chromium.org/2462963002/diff/20001/chrome/browser/permissi... chrome/browser/permissions/permission_dialog_delegate.h:51: // TODO: remove this when media stream requests are eventually folded in with On 2016/11/02 08:09:04, raymes wrote: > nit: Please add yourself as the TODO(author). Having yourself in a TODO doesn't > mean that you have to be the one to fix it, it just means that your are the one > who knows something about it. Done.
The CQ bit was checked by dominickn@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm
lgtm https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... File chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java (right): https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:79: @MediumTest Not sure if these Smoke and MediumTest notations matter anymore (they might even be deprecated). https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:84: "Camera count:", "initiate_getCamera()", 1, false, false, false, false); Is this exactly the same as above, except for the small change in the commandline flags? https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:192: * Verify combined creates an InfoBar with a persistence toggle if that feature is enabled. /methinks all of these javadocs need another pass.
Thanks! sergeyu: ping, it's been a week with no reply here.
lgtm
The CQ bit was checked by dominickn@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks! https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... File chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java (right): https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:79: @MediumTest On 2016/11/07 18:22:57, dfalcantara (check my queue) wrote: > Not sure if these Smoke and MediumTest notations matter anymore (they might even > be deprecated). There's actually a check in the instrumentation test runner that you have at least one of them. ¯\_(ツ)_/¯ https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:84: "Camera count:", "initiate_getCamera()", 1, false, false, false, false); On 2016/11/07 18:22:57, dfalcantara (check my queue) wrote: > Is this exactly the same as above, except for the small change in the > commandline flags? Yes, it's testing that even when modals are enabled, triggering a permission prompt with no gesture gives an infobar. https://codereview.chromium.org/2462963002/diff/40001/chrome/android/javatest... chrome/android/javatests/src/org/chromium/chrome/browser/permissions/MediaTest.java:192: * Verify combined creates an InfoBar with a persistence toggle if that feature is enabled. On 2016/11/07 18:22:57, dfalcantara (check my queue) wrote: > /methinks all of these javadocs need another pass. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by dominickn@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sergeyu@chromium.org, raymes@chromium.org, dfalcantara@chromium.org Link to the patchset: https://codereview.chromium.org/2462963002/#ps60001 (title: "Nits")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, which is disabled by default. The intention is to test this new prompt to a small percentage of users to determine its effectiveness in improving the overall permissions request flow. This follows crrev.com/2446063002, which implements the modal dialog for all other permissions on Android. Currently, modal prompts use a PermissionDialogDelegate, which wraps the PermissionInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 ========== to ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, which is disabled by default. The intention is to test this new prompt to a small percentage of users to determine its effectiveness in improving the overall permissions request flow. This follows crrev.com/2446063002, which implements the modal dialog for all other permissions on Android. Currently, modal prompts use a PermissionDialogDelegate, which wraps the PermissionInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, which is disabled by default. The intention is to test this new prompt to a small percentage of users to determine its effectiveness in improving the overall permissions request flow. This follows crrev.com/2446063002, which implements the modal dialog for all other permissions on Android. Currently, modal prompts use a PermissionDialogDelegate, which wraps the PermissionInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 ========== to ========== Implement modal permission prompts for media permissions on Android. This CL adds support for camera and microphone permission requests on Android using a modal dialog prompt. This is controlled by the ModalPermissionPrompts feature, which is disabled by default. The intention is to test this new prompt to a small percentage of users to determine its effectiveness in improving the overall permissions request flow. This follows crrev.com/2446063002, which implements the modal dialog for all other permissions on Android. Currently, modal prompts use a PermissionDialogDelegate, which wraps the PermissionInfoBarDelegate class and allows the Java-side dialog UI to communicate with the native C++ permissions layer. Upcoming refactoring work will eliminate the per-permission InfoBarDelegate classes, and simply allow the generic PermissionInfoBarDelegate class to wrap a PermissionPromptAndroid object which will provide all permission-specific data. At that point, PermissionDialogDelegate will also change to analogously wrap PermissionPromptAndroid. New Android media permissions UI tests are introduced to test the modal dialogs under various configurations, including with and without the optional persistence toggle. BUG=658125 Committed: https://crrev.com/c70672a6e41ed5fa46bee5df7f0bdc99cbbf0476 Cr-Commit-Position: refs/heads/master@{#431142} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/c70672a6e41ed5fa46bee5df7f0bdc99cbbf0476 Cr-Commit-Position: refs/heads/master@{#431142} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
