Backed out changeset be38251ea56b (bug 1888540) for causing failures on test_TopSites...
[gecko.git] / media / wmf-clearkey / WMFClearKeyContentEnabler.cpp
bloba9aa230e11673c99af186cd464165e72a2d5befa
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/. */
5 #include "WMFClearKeyContentEnabler.h"
7 #include <mfapi.h>
8 #include <mferror.h>
10 #include "WMFClearKeyUtils.h"
12 namespace mozilla {
14 using Microsoft::WRL::ComPtr;
16 HRESULT WMFClearKeyContentEnabler::RuntimeClassInitialize() { return S_OK; }
18 STDMETHODIMP WMFClearKeyContentEnabler::AutomaticEnable() {
19 NOT_IMPLEMENTED();
20 return E_NOTIMPL;
23 STDMETHODIMP WMFClearKeyContentEnabler::Cancel() {
24 NOT_IMPLEMENTED();
25 return E_NOTIMPL;
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;
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;
42 STDMETHODIMP WMFClearKeyContentEnabler::IsAutomaticSupported(BOOL* aAutomatic) {
43 ENTRY_LOG();
44 if (!aAutomatic) {
45 return E_INVALIDARG;
47 *aAutomatic = FALSE;
48 return S_OK;
51 STDMETHODIMP WMFClearKeyContentEnabler::MonitorEnable() {
52 NOT_IMPLEMENTED();
53 return E_NOTIMPL;
56 STDMETHODIMP WMFClearKeyContentEnabler::GetEnableType(GUID* aType) {
57 LOG("WMFClearKeyContentEnabler::GetEnableType");
58 if (!aType) {
59 return E_INVALIDARG;
61 *aType = MEDIA_FOUNDATION_CLEARKEY_GUID_CONTENT_ENABLER_TYPE;
62 return S_OK;
65 } // namespace mozilla