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

Unified Diff: content/browser/media/media_devices_permission_checker.h

Issue 2872913003: Do not pass the origin to MediaDevicesDispatcherHost. (Closed)
Patch Set: Add tests with unique origin Created 3 years, 7 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 | « content/browser/bad_message.h ('k') | content/browser/media/media_devices_permission_checker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/media_devices_permission_checker.h
diff --git a/content/browser/media/media_devices_permission_checker.h b/content/browser/media/media_devices_permission_checker.h
index 3eb22554b219eeb3c2b7a518a48802abf46f2bb1..1e4d22fbe339f3c5a328b1d1558e329cbe160e62 100644
--- a/content/browser/media/media_devices_permission_checker.h
+++ b/content/browser/media/media_devices_permission_checker.h
@@ -12,10 +12,6 @@
#include "content/browser/renderer_host/media/media_devices_manager.h"
#include "content/common/content_export.h"
-namespace url {
-class Origin;
-}
-
namespace content {
// This class provides various utility functions to check if a render frame
@@ -28,41 +24,37 @@ class CONTENT_EXPORT MediaDevicesPermissionChecker {
// |override_value| to all permission requests. Use only for testing.
explicit MediaDevicesPermissionChecker(bool override_value);
- // Checks if the origin |security_origin| associated to a render frame
- // identified by |render_process_id| and |render_frame_id| is allowed to
- // access the media device type |device_type|.
+ // Checks if the origin associated to a render frame identified by
+ // |render_process_id| and |render_frame_id| is allowed to access the media
+ // device type |device_type|.
// This method must be called on the UI thread.
bool CheckPermissionOnUIThread(MediaDeviceType device_type,
int render_process_id,
- int render_frame_id,
- const url::Origin& security_origin) const;
+ int render_frame_id) const;
- // Checks if the origin |security_origin| associated to a render frame
- // identified by |render_process_id| and |render_frame_id| is allowed to
- // access the media device type |device_type|. The result is passed to
- // |callback|.
+ // Checks if the origin associated to a render frame identified by
+ // |render_process_id| and |render_frame_id| is allowed to access the media
+ // device type |device_type|. The result is passed to |callback|.
// This method can be called on any thread. |callback| is fired on the same
// thread this method is called on.
void CheckPermission(MediaDeviceType device_type,
int render_process_id,
int render_frame_id,
- const url::Origin& security_origin,
const base::Callback<void(bool)>& callback) const;
- // Checks if the origin |security_origin| associated to a render frame
- // identified by |render_process_id| and |render_frame_id| is allowed to
- // access the media device types marked with a value of true in
- // |requested_device_types|. The result is passed to |callback|. The result is
- // indexed by MediaDeviceType. Entries in the result with a value of true for
- // requested device types indicate that the frame has permission to access
- // devices of the corresponding types.
+ // Checks if the origin associated to a render frame identified by
+ // |render_process_id| and |render_frame_id| is allowed to access the media
+ // device types marked with a value of true in |requested_device_types|. The
+ // result is passed to |callback|. The result is indexed by MediaDeviceType.
+ // Entries in the result with a value of true for requested device types
+ // indicate that the frame has permission to access devices of the
+ // corresponding types.
// This method can be called on any thread. |callback| is fired on the same
// thread this method is called on.
void CheckPermissions(
MediaDevicesManager::BoolDeviceTypes requested_device_types,
int render_process_id,
int render_frame_id,
- const url::Origin& security_origin,
const base::Callback<void(const MediaDevicesManager::BoolDeviceTypes&)>&
callback) const;
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/media/media_devices_permission_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698