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

Side by Side Diff: chrome/browser/media/webrtc/media_permission.h

Issue 2759593002: Remove c/b/media/webrtc/media_permission.{h,cc} (Closed)
Patch Set: Remove c/b/media/webrtc/media_permission.{h,cc} Created 3 years, 8 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/media/webrtc/media_permission.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_PERMISSION_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_PERMISSION_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "components/content_settings/core/common/content_settings.h"
12 #include "components/content_settings/core/common/content_settings_types.h"
13 #include "content/public/common/media_stream_request.h"
14 #include "url/gurl.h"
15
16 class Profile;
17
18 namespace content {
19 class WebContents;
20 }
21
22 // Represents a permission for microphone/camera access.
23 class MediaPermission {
24 public:
25 MediaPermission(ContentSettingsType content_type,
26 const GURL& requesting_origin,
27 const GURL& embedding_origin,
28 Profile* profile,
29 content::WebContents* web_contents);
30
31 // Returns the status of the permission. If the setting is
32 // CONTENT_SETTING_BLOCK, |denial_reason| will output the reason for it being
33 // blocked.
34 ContentSetting GetPermissionStatus(
35 content::MediaStreamRequestResult* denial_reason) const;
36
37 private:
38 bool HasAvailableDevices(const std::string& device_id) const;
39
40 const ContentSettingsType content_type_;
41 const GURL requesting_origin_;
42 const GURL embedding_origin_;
43 const std::string device_id_;
44 Profile* const profile_;
45 content::WebContents* const web_contents_;
46
47 DISALLOW_COPY_AND_ASSIGN(MediaPermission);
48 };
49
50 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_PERMISSION_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/media/webrtc/media_permission.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698