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

Unified Diff: chrome/common/extensions/request_media_access_permission_helper.h

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/chrome_common.gypi ('k') | chrome/common/extensions/request_media_access_permission_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/request_media_access_permission_helper.h
diff --git a/chrome/common/extensions/request_media_access_permission_helper.h b/chrome/common/extensions/request_media_access_permission_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d8a7686d0479d1c092d5dca59098dbd93a169ee
--- /dev/null
+++ b/chrome/common/extensions/request_media_access_permission_helper.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_EXTENSIONS_REQUEST_MEDIA_ACCESS_PERMISSION_HELPER_H_
+#define CHROME_COMMON_EXTENSIONS_REQUEST_MEDIA_ACCESS_PERMISSION_HELPER_H_
+
+#include "base/callback.h"
+#include "chrome/common/extensions/extension.h"
+#include "content/public/common/media_stream_request.h"
+
+namespace content{
+typedef base::Callback< void(const MediaStreamDevices&) > MediaResponseCallback;
+} // namespace content
+
+namespace extensions {
+
+class RequestMediaAccessPermissionHelper {
+ public:
+ static void AuthorizeRequest(const content::MediaStreamRequest* request,
+ const content::MediaResponseCallback& callback,
+ const extensions::Extension* extension,
+ bool is_packaged_app);
+
+ private:
+ RequestMediaAccessPermissionHelper();
+ ~RequestMediaAccessPermissionHelper();
+
+ DISALLOW_COPY_AND_ASSIGN(RequestMediaAccessPermissionHelper);
+};
+
+} // namespace extensions
+
+#endif // CHROME_COMMON_EXTENSIONS_REQUEST_MEDIA_ACCESS_PERMISSION_HELPER_H_
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/request_media_access_permission_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698