tor-browser

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

WMFClearKeyContentEnabler.cpp (1697B)


      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 "WMFClearKeyContentEnabler.h"
      6 
      7 #include <mfapi.h>
      8 #include <mferror.h>
      9 
     10 #include "WMFClearKeyUtils.h"
     11 
     12 namespace mozilla {
     13 
     14 using Microsoft::WRL::ComPtr;
     15 
     16 HRESULT WMFClearKeyContentEnabler::RuntimeClassInitialize() { return S_OK; }
     17 
     18 STDMETHODIMP WMFClearKeyContentEnabler::AutomaticEnable() {
     19  NOT_IMPLEMENTED();
     20  return E_NOTIMPL;
     21 }
     22 
     23 STDMETHODIMP WMFClearKeyContentEnabler::Cancel() {
     24  NOT_IMPLEMENTED();
     25  return E_NOTIMPL;
     26 }
     27 
     28 STDMETHODIMP WMFClearKeyContentEnabler::GetEnableData(BYTE** aData,
     29                                                      DWORD* aDataSize) {
     30  ENTRY_LOG();
     31  // Does not support this method of content enabling with EME.
     32  return MF_E_NOT_AVAILABLE;
     33 }
     34 
     35 STDMETHODIMP WMFClearKeyContentEnabler::GetEnableURL(
     36    LPWSTR* aUrl, DWORD* aUrlSize, MF_URL_TRUST_STATUS* aTrustStatus) {
     37  ENTRY_LOG();
     38  // Does not support this method of content enabling with EME.
     39  return MF_E_NOT_AVAILABLE;
     40 }
     41 
     42 STDMETHODIMP WMFClearKeyContentEnabler::IsAutomaticSupported(BOOL* aAutomatic) {
     43  ENTRY_LOG();
     44  if (!aAutomatic) {
     45    return E_INVALIDARG;
     46  }
     47  *aAutomatic = FALSE;
     48  return S_OK;
     49 }
     50 
     51 STDMETHODIMP WMFClearKeyContentEnabler::MonitorEnable() {
     52  NOT_IMPLEMENTED();
     53  return E_NOTIMPL;
     54 }
     55 
     56 STDMETHODIMP WMFClearKeyContentEnabler::GetEnableType(GUID* aType) {
     57  LOG("WMFClearKeyContentEnabler::GetEnableType");
     58  if (!aType) {
     59    return E_INVALIDARG;
     60  }
     61  *aType = MEDIA_FOUNDATION_CLEARKEY_GUID_CONTENT_ENABLER_TYPE;
     62  return S_OK;
     63 }
     64 
     65 }  // namespace mozilla