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

Unified Diff: chrome/browser/permissions/permission_prompt_android.cc

Issue 2930843002: Allow modal mic+camera permission prompts in PRM codepath (Closed)
Patch Set: check all gesture bits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/permissions/permission_dialog_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_prompt_android.cc
diff --git a/chrome/browser/permissions/permission_prompt_android.cc b/chrome/browser/permissions/permission_prompt_android.cc
index 7e47372f443f4dc6e828f12d23e80b83059a97f4..9893147833314b1f6e2ca639c72794b6066951ed 100644
--- a/chrome/browser/permissions/permission_prompt_android.cc
+++ b/chrome/browser/permissions/permission_prompt_android.cc
@@ -29,15 +29,14 @@ void PermissionPromptAndroid::SetDelegate(Delegate* delegate) {
}
void PermissionPromptAndroid::Show() {
- // Grouped permission requests are not yet supported in dialogs.
- // TODO(timloh): Handle grouped media permissions (camera + microphone).
- if (delegate_->Requests().size() == 1) {
- bool has_gesture = delegate_->Requests()[0]->GetGestureType() ==
- PermissionRequestGestureType::GESTURE;
- if (PermissionDialogDelegate::ShouldShowDialog(has_gesture)) {
- PermissionDialogDelegate::Create(web_contents_, this);
- return;
- }
+ bool has_gesture = true;
+ for (const PermissionRequest* request : delegate_->Requests()) {
+ has_gesture &=
+ request->GetGestureType() == PermissionRequestGestureType::GESTURE;
+ }
+ if (PermissionDialogDelegate::ShouldShowDialog(has_gesture)) {
+ PermissionDialogDelegate::Create(web_contents_, this);
+ return;
}
InfoBarService* infobar_service =
« no previous file with comments | « chrome/browser/permissions/permission_dialog_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698