tor-browser

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

WMFClearKeyTrustedInput.cpp (1028B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #include "WMFClearKeyTrustedInput.h"
      6 
      7 #include "WMFClearKeyCDM.h"
      8 #include "WMFClearKeyInputTrustAuthority.h"
      9 #include "WMFClearKeyUtils.h"
     10 
     11 namespace mozilla {
     12 
     13 using Microsoft::WRL::ComPtr;
     14 using Microsoft::WRL::MakeAndInitialize;
     15 
     16 HRESULT WMFClearKeyTrustedInput::RuntimeClassInitialize(
     17    SessionManagerWrapper* aSessionManager) {
     18  ENTRY_LOG();
     19  mSessionManager = aSessionManager;
     20  return S_OK;
     21 }
     22 
     23 // IMFTrustedInput
     24 STDMETHODIMP WMFClearKeyTrustedInput::GetInputTrustAuthority(
     25    DWORD aStreamId, REFIID aRiid, IUnknown** aAuthority) {
     26  ENTRY_LOG();
     27  ComPtr<IMFInputTrustAuthority> ita;
     28  RETURN_IF_FAILED((
     29      MakeAndInitialize<WMFClearKeyInputTrustAuthority, IMFInputTrustAuthority>(
     30          &ita, aStreamId, mSessionManager)));
     31  *aAuthority = ita.Detach();
     32  return S_OK;
     33 }
     34 
     35 }  // namespace mozilla