feat: add session.setPermissionCheckHandler (#13925)

* feat: add session.setPermissionCheckHandler to handle syncornous permission checks vs requests

* spec: add tests for session.setPermissionCheckHandler

* docs: add docs for session.setPermissionCheckHandler

* feat: add mediaType to media permission checks

* chore: cleanup check impl
This commit is contained in:
Samuel Attard 2018-08-29 02:05:08 +12:00 committed by Charles Kerr
parent afdb6c5f90
commit 68da311ed1
10 changed files with 142 additions and 1 deletions

View file

@ -718,7 +718,9 @@ void WebContents::FindReply(content::WebContents* web_contents,
bool WebContents::CheckMediaAccessPermission(content::WebContents* web_contents,
const GURL& security_origin,
content::MediaStreamType type) {
return true;
auto* permission_helper =
WebContentsPermissionHelper::FromWebContents(web_contents);
return permission_helper->CheckMediaAccessPermission(security_origin, type);
}
void WebContents::RequestMediaAccessPermission(