summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h')
-rw-r--r--chromium/chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/chromium/chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h b/chromium/chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h
new file mode 100644
index 00000000000..9e1269beb47
--- /dev/null
+++ b/chromium/chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h
@@ -0,0 +1,36 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Functions for handling stats for system media permissions (camera,
+// microphone).
+
+#ifndef CHROME_BROWSER_MEDIA_WEBRTC_SYSTEM_MEDIA_CAPTURE_PERMISSIONS_STATS_MAC_H_
+#define CHROME_BROWSER_MEDIA_WEBRTC_SYSTEM_MEDIA_CAPTURE_PERMISSIONS_STATS_MAC_H_
+
+#include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h"
+
+class PrefRegistrySimple;
+
+namespace system_media_permissions {
+
+// Registers preferences used for system media permissions stats.
+void RegisterSystemMediaPermissionStatesPrefs(PrefRegistrySimple* registry);
+
+// Logs stats for system media permissions. Called once per browser session, at
+// browser start.
+void LogSystemMediaPermissionsStartupStats();
+
+// Called when a system permission goes from "not determined" to another state.
+// The new permission is logged as startup state.
+void SystemAudioCapturePermissionDetermined(SystemPermission permission);
+void SystemVideoCapturePermissionDetermined(SystemPermission permission);
+
+// Called when a system permission was requested but was blocked. Information
+// stored is later used when logging stats at startup.
+void SystemAudioCapturePermissionBlocked();
+void SystemVideoCapturePermissionBlocked();
+
+} // namespace system_media_permissions
+
+#endif // CHROME_BROWSER_MEDIA_WEBRTC_SYSTEM_MEDIA_CAPTURE_PERMISSIONS_STATS_MAC_H_