1 // Copyright 2019 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_AUTHORIZATION_WRAPPER_MAC_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_AUTHORIZATION_WRAPPER_MAC_H_
7 
8 #import <Foundation/NSString.h>
9 
10 #include "base/callback_forward.h"
11 
12 namespace system_media_permissions {
13 
14 class MediaAuthorizationWrapper {
15  public:
~MediaAuthorizationWrapper()16   virtual ~MediaAuthorizationWrapper() {}
17 
18   // NB: NSInteger is used rather than AVAuthorizationStatus; when macOS 10.14
19   // is the minimum requirement for Chromium, switch types.
20   virtual NSInteger AuthorizationStatusForMediaType(NSString* media_type) = 0;
21   virtual void RequestAccessForMediaType(NSString* media_type,
22                                          base::RepeatingClosure callback,
23                                          const base::TaskTraits& traits) = 0;
24 };
25 
26 }  // namespace system_media_permissions
27 
28 #endif  // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_AUTHORIZATION_WRAPPER_MAC_H_
29