feat: provide the frame URL with permission requests and checks (#18757)

* feat: provide the frame URL with permission requests and checks

Also provides a handy isMainFrame property to determine if it is an
iframe making the request

* chore: refactor to use base::Value

* chore: use Set<Type>Key over SetPath
This commit is contained in:
Samuel Attard 2019-06-13 11:11:43 -07:00 committed by GitHub
parent 7c76d0e34a
commit ac02ab9fde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 21 deletions

View file

@ -32,11 +32,11 @@ class AtomPermissionManager : public content::PermissionControllerDelegate {
using RequestHandler = base::Callback<void(content::WebContents*,
content::PermissionType,
StatusCallback,
const base::DictionaryValue&)>;
const base::Value&)>;
using CheckHandler = base::Callback<bool(content::WebContents*,
content::PermissionType,
const GURL& requesting_origin,
const base::DictionaryValue&)>;
const base::Value&)>;
// Handler to dispatch permission requests in JS.
void SetPermissionRequestHandler(const RequestHandler& handler);