Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2880)

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 11198044: Make tab capture media stream requests verify that the request came from extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/media/media_stream_devices_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index d370c268c555b51ae652538ac323cac0c26de36b..5266a3312494a91bffabd0d5a8adb146c84858ba 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -35,6 +35,8 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_messages.h"
+#include "chrome/common/extensions/feature_switch.h"
+#include "chrome/common/extensions/request_media_access_permission_helper.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/content_browser_client.h"
@@ -640,4 +642,13 @@ void ExtensionHost::RenderViewReady() {
content::Details<ExtensionHost>(this));
}
+void ExtensionHost::RequestMediaAccessPermission(
+ content::WebContents* web_contents,
+ const content::MediaStreamRequest* request,
+ const content::MediaResponseCallback& callback) {
+ // For tab capture device, we require the tabCapture permission.
+ RequestMediaAccessPermissionHelper::AuthorizeRequest(
+ request, callback, extension(), false);
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/media/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698