diff options
author | grunell <grunell@chromium.org> | 2014-09-17 17:09:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-18 00:09:55 +0000 |
commit | 657d4d8c7d26c89c0846479ac322931bfaba4f86 (patch) | |
tree | 2a853ed570eb321b1f0a77fc8afe656a0f0e0210 /apps | |
parent | ee83dcef7d2552d2221ac5be9f8ac831942ba670 (diff) | |
download | chromium_src-657d4d8c7d26c89c0846479ac322931bfaba4f86.zip chromium_src-657d4d8c7d26c89c0846479ac322931bfaba4f86.tar.gz chromium_src-657d4d8c7d26c89c0846479ac322931bfaba4f86.tar.bz2 |
Check media permissions through RenderFrameHostDelegate.
* Add function CheckMediaAccessPermission on RenderFrameHostDelegate, WebContentsDelegate, classes implementing those and chain it to MediaCaptureDevicesDispatcher::CheckMediaAccessPermission through the different paths. (Essentially add this function side-by-side with RequestMediaAccessPermission.)
* Change MediaStreamManager to use this function for checking permission when determining if device labels should be visible.
BUG=406094
Review URL: https://codereview.chromium.org/562263002
Cr-Commit-Position: refs/heads/master@{#295379}
Diffstat (limited to 'apps')
-rw-r--r-- | apps/custom_launcher_page_contents.cc | 8 | ||||
-rw-r--r-- | apps/custom_launcher_page_contents.h | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/custom_launcher_page_contents.cc b/apps/custom_launcher_page_contents.cc index 023c305..7a2f4b2 100644 --- a/apps/custom_launcher_page_contents.cc +++ b/apps/custom_launcher_page_contents.cc @@ -126,6 +126,14 @@ void CustomLauncherPageContents::RequestMediaAccessPermission( helper_->RequestMediaAccessPermission(request, callback); } +bool CustomLauncherPageContents::CheckMediaAccessPermission( + content::WebContents* web_contents, + const GURL& security_origin, + content::MediaStreamType type) { + DCHECK_EQ(web_contents_.get(), web_contents); + return helper_->CheckMediaAccessPermission(security_origin, type); +} + bool CustomLauncherPageContents::OnMessageReceived( const IPC::Message& message) { bool handled = true; diff --git a/apps/custom_launcher_page_contents.h b/apps/custom_launcher_page_contents.h index 36e7f79..eaa7673 100644 --- a/apps/custom_launcher_page_contents.h +++ b/apps/custom_launcher_page_contents.h @@ -71,6 +71,10 @@ class CustomLauncherPageContents content::WebContents* web_contents, const content::MediaStreamRequest& request, const content::MediaResponseCallback& callback) OVERRIDE; + virtual bool CheckMediaAccessPermission( + content::WebContents* web_contents, + const GURL& security_origin, + content::MediaStreamType type) OVERRIDE; private: // content::WebContentsObserver overrides: |