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

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

Issue 15738004: Add a policy list for access to capture devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add tests and improve documentation Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DEVICES_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/public/browser/web_contents_delegate.h" 10 #include "content/public/browser/web_contents_delegate.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 private: 46 private:
47 enum DevicePolicy { 47 enum DevicePolicy {
48 POLICY_NOT_SET, 48 POLICY_NOT_SET,
49 ALWAYS_DENY, 49 ALWAYS_DENY,
50 ALWAYS_ALLOW, 50 ALWAYS_ALLOW,
51 }; 51 };
52 52
53 // Called by GetAudioDevicePolicy and GetVideoDevicePolicy to check 53 // Called by GetAudioDevicePolicy and GetVideoDevicePolicy to check
54 // the currently set capture device policy. 54 // the currently set capture device policy.
55 DevicePolicy GetDevicePolicy(const char* policy_name) const; 55 DevicePolicy GetDevicePolicy(const char* policy_name,
56 const char* whitelist_policy_name) const;
56 57
57 // Returns true if the origin of the request has been granted the media 58 // Returns true if the origin of the request has been granted the media
58 // access before, otherwise returns false. 59 // access before, otherwise returns false.
59 bool IsRequestAllowedByDefault() const; 60 bool IsRequestAllowedByDefault() const;
60 61
61 // Returns true if the media access for the origin of the request has been 62 // Returns true if the media access for the origin of the request has been
62 // blocked before. Otherwise returns false. 63 // blocked before. Otherwise returns false.
63 bool IsRequestBlockedByDefault() const; 64 bool IsRequestBlockedByDefault() const;
64 65
65 // Returns true if the media section in content settings is set to 66 // Returns true if the media section in content settings is set to
(...skipping 30 matching lines...) Expand all
96 // audio/video devices was granted or not. 97 // audio/video devices was granted or not.
97 content::MediaResponseCallback callback_; 98 content::MediaResponseCallback callback_;
98 99
99 bool microphone_requested_; 100 bool microphone_requested_;
100 bool webcam_requested_; 101 bool webcam_requested_;
101 102
102 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); 103 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController);
103 }; 104 };
104 105
105 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ 106 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698