Plumb the RenderFrameHost through for CheckMediaAccessPermission
https://chromium-review.googlesource.com/938862
This commit is contained in:
parent
ca28b39d9c
commit
833b55107d
2 changed files with 7 additions and 4 deletions
atom/browser/api
|
@ -718,9 +718,12 @@ void WebContents::FindReply(content::WebContents* web_contents,
|
||||||
Emit("found-in-page", result);
|
Emit("found-in-page", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebContents::CheckMediaAccessPermission(content::WebContents* web_contents,
|
bool WebContents::CheckMediaAccessPermission(
|
||||||
const GURL& security_origin,
|
content::RenderFrameHost* render_frame_host,
|
||||||
content::MediaStreamType type) {
|
const GURL& security_origin,
|
||||||
|
content::MediaStreamType type) {
|
||||||
|
auto* web_contents =
|
||||||
|
content::WebContents::FromRenderFrameHost(render_frame_host);
|
||||||
auto* permission_helper =
|
auto* permission_helper =
|
||||||
WebContentsPermissionHelper::FromWebContents(web_contents);
|
WebContentsPermissionHelper::FromWebContents(web_contents);
|
||||||
return permission_helper->CheckMediaAccessPermission(security_origin, type);
|
return permission_helper->CheckMediaAccessPermission(security_origin, type);
|
||||||
|
|
|
@ -330,7 +330,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
||||||
const gfx::Rect& selection_rect,
|
const gfx::Rect& selection_rect,
|
||||||
int active_match_ordinal,
|
int active_match_ordinal,
|
||||||
bool final_update) override;
|
bool final_update) override;
|
||||||
bool CheckMediaAccessPermission(content::WebContents* web_contents,
|
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
|
||||||
const GURL& security_origin,
|
const GURL& security_origin,
|
||||||
content::MediaStreamType type) override;
|
content::MediaStreamType type) override;
|
||||||
void RequestMediaAccessPermission(
|
void RequestMediaAccessPermission(
|
||||||
|
|
Loading…
Add table
Reference in a new issue