| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_ |
| 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_ | 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_ |
| 7 | 7 |
| 8 #include "components/content_settings/core/common/content_settings_types.h" |
| 9 |
| 8 class GURL; | 10 class GURL; |
| 9 class Profile; | 11 class Profile; |
| 10 | 12 |
| 11 enum MediaStreamDevicePolicy { | 13 enum MediaStreamDevicePolicy { |
| 12 POLICY_NOT_SET, | 14 POLICY_NOT_SET, |
| 13 ALWAYS_DENY, | 15 ALWAYS_DENY, |
| 14 ALWAYS_ALLOW, | 16 ALWAYS_ALLOW, |
| 15 }; | 17 }; |
| 16 | 18 |
| 17 // Returns true if security origin is from internal objects like | 19 // Returns true if security origin is from internal objects like |
| 18 // chrome://URLs, otherwise returns false. | 20 // chrome://URLs, otherwise returns false. |
| 19 bool CheckAllowAllMediaStreamContentForOrigin(Profile* profile, | 21 bool CheckAllowAllMediaStreamContentForOrigin(Profile* profile, |
| 20 const GURL& security_origin); | 22 const GURL& security_origin, |
| 23 ContentSettingsType type); |
| 21 | 24 |
| 22 // Get the device policy for |security_origin| and |profile|. | 25 // Get the device policy for |security_origin| and |profile|. |
| 23 MediaStreamDevicePolicy GetDevicePolicy(Profile* profile, | 26 MediaStreamDevicePolicy GetDevicePolicy(Profile* profile, |
| 24 const GURL& security_origin, | 27 const GURL& security_origin, |
| 25 const char* policy_name, | 28 const char* policy_name, |
| 26 const char* whitelist_policy_name); | 29 const char* whitelist_policy_name); |
| 27 | 30 |
| 28 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_ | 31 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_ |
| OLD | NEW |