tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CamerasTypes.cpp (839B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set sw=2 ts=8 et ft=cpp : */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "CamerasTypes.h"
      8 
      9 namespace mozilla::camera {
     10 
     11 TrackingId::Source CaptureEngineToTrackingSourceStr(
     12    const CaptureEngine& aEngine) {
     13  switch (aEngine) {
     14    case ScreenEngine:
     15      return TrackingId::Source::Screen;
     16    case BrowserEngine:
     17      return TrackingId::Source::Tab;
     18    case WinEngine:
     19      return TrackingId::Source::Window;
     20    case CameraEngine:
     21      return TrackingId::Source::Camera;
     22    default:
     23      return TrackingId::Source::Unimplemented;
     24  }
     25 }
     26 }  // namespace mozilla::camera