michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "GfxInfo.h" michael@0: michael@0: using namespace mozilla::widget; michael@0: michael@0: /* GetD2DEnabled and GetDwriteEnabled shouldn't be called until after gfxPlatform initialization michael@0: * has occurred because they depend on it for information. (See bug 591561) */ michael@0: nsresult michael@0: GfxInfo::GetD2DEnabled(bool *aEnabled) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: nsresult michael@0: GfxInfo::GetDWriteEnabled(bool *aEnabled) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString DWriteVersion; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString cleartypeParameters; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDescription; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) michael@0: { michael@0: aAdapterDescription.AssignLiteral(""); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDescription2; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterRAM; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) michael@0: { michael@0: aAdapterRAM.AssignLiteral(""); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterRAM2; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDriver; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) michael@0: { michael@0: aAdapterDriver.AssignLiteral(""); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDriver2; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDriverVersion; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) michael@0: { michael@0: aAdapterDriverVersion.AssignLiteral(""); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDriverVersion2; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDriverDate; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) michael@0: { michael@0: aAdapterDriverDate.AssignLiteral(""); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDriverDate2; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterVendorID; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) michael@0: { michael@0: aAdapterVendorID.AssignLiteral(""); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterVendorID2; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDeviceID; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) michael@0: { michael@0: aAdapterDeviceID.AssignLiteral(""); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* readonly attribute DOMString adapterDeviceID2; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: /* readonly attribute boolean isGPU2Active; */ michael@0: NS_IMETHODIMP michael@0: GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) michael@0: { michael@0: return NS_ERROR_FAILURE; michael@0: } michael@0: michael@0: const nsTArray& michael@0: GfxInfo::GetGfxDriverInfo() michael@0: { michael@0: return *mDriverInfo; michael@0: } michael@0: michael@0: uint32_t GfxInfo::OperatingSystemVersion() michael@0: { michael@0: return 0; michael@0: } michael@0: michael@0: nsresult michael@0: GfxInfo::GetFeatureStatusImpl(int32_t /*aFeature*/, michael@0: int32_t *aStatus, michael@0: nsAString & /*aSuggestedDriverVersion*/, michael@0: const nsTArray& /*aDriverInfo*/, michael@0: OperatingSystem* /*aOS*/ /* = nullptr */) michael@0: { michael@0: NS_ENSURE_ARG_POINTER(aStatus); michael@0: *aStatus = nsIGfxInfo::FEATURE_NO_INFO; michael@0: michael@0: return NS_OK; michael@0: } michael@0: michael@0: #ifdef DEBUG michael@0: michael@0: // Implement nsIGfxInfoDebug michael@0: michael@0: /* void spoofVendorID (in DOMString aVendorID); */ michael@0: NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString &) michael@0: { michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* void spoofDeviceID (in unsigned long aDeviceID); */ michael@0: NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString &) michael@0: { michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* void spoofDriverVersion (in DOMString aDriverVersion); */ michael@0: NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString &) michael@0: { michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* void spoofOSVersion (in unsigned long aVersion); */ michael@0: NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t) michael@0: { michael@0: return NS_OK; michael@0: } michael@0: michael@0: #endif