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

Side by Side Diff: chrome/browser/media/media_stream_device_permissions.h

Issue 1318173002: Integrate MediaPermission with PermissionManager by using PermissionContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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.h" 8 #include "components/content_settings/core/common/content_settings.h"
9 #include "components/content_settings/core/common/content_settings_types.h" 9 #include "components/content_settings/core/common/content_settings_types.h"
10 #include "content/public/common/media_stream_request.h" 10 #include "content/public/common/media_stream_request.h"
11 11
12 class GURL; 12 class GURL;
13 class Profile; 13 class Profile;
14 14
15 enum MediaStreamDevicePolicy { 15 enum MediaStreamDevicePolicy {
16 POLICY_NOT_SET, 16 POLICY_NOT_SET,
17 ALWAYS_DENY, 17 ALWAYS_DENY,
18 ALWAYS_ALLOW, 18 ALWAYS_ALLOW,
19 }; 19 };
20 20
21 // Returns true if the given media content setting should be persisted. 21 // Returns true if the given media content setting should be persisted.
22 bool ShouldPersistContentSetting(ContentSetting setting, 22 bool ShouldPersistContentSetting(ContentSetting setting,
23 const GURL& origin, 23 const GURL& origin,
24 content::MediaStreamRequestType type); 24 bool is_pepper_request);
25 25
26 // Get the device policy for |security_origin| and |profile|. 26 // Get the device policy for |security_origin| and |profile|.
27 MediaStreamDevicePolicy GetDevicePolicy(const Profile* profile, 27 MediaStreamDevicePolicy GetDevicePolicy(const Profile* profile,
28 const GURL& security_origin, 28 const GURL& security_origin,
29 const char* policy_name, 29 const char* policy_name,
30 const char* whitelist_policy_name); 30 const char* whitelist_policy_name);
31 31
32 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_ 32 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698