[PEPC] Add new flag PermissionElementDialogPositioning

This new flags enables positioning the permission dialog over the
permission element, instead of in the center of the web view.

Bug: 1462930
Change-Id: I9f29f02c2668e5682e231d48ff04dd7f0c5794e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5125716
Reviewed-by: Thomas Nguyen <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Andy Paicu <[email protected]>
Reviewed-by: Dominik Röttsches <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1270104}
diff --git a/components/permissions/permission_request.h b/components/permissions/permission_request.h
index 1b65018..641feea 100644
--- a/components/permissions/permission_request.h
+++ b/components/permissions/permission_request.h
@@ -151,6 +151,9 @@
   // element.
   bool IsEmbeddedPermissionElementInitiated() const;
 
+  // Returns the position of the element that caused the prompt to open.
+  std::optional<gfx::Rect> GetAnchorElementPosition() const;
+
   // Returns true if the request has two origins and should use the two origin
   // prompt. Returns false otherwise.
   bool ShouldUseTwoOriginPrompt() const;