Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "GfxInfo.h" |
michael@0 | 7 | |
michael@0 | 8 | using namespace mozilla::widget; |
michael@0 | 9 | |
michael@0 | 10 | /* GetD2DEnabled and GetDwriteEnabled shouldn't be called until after gfxPlatform initialization |
michael@0 | 11 | * has occurred because they depend on it for information. (See bug 591561) */ |
michael@0 | 12 | nsresult |
michael@0 | 13 | GfxInfo::GetD2DEnabled(bool *aEnabled) |
michael@0 | 14 | { |
michael@0 | 15 | return NS_ERROR_FAILURE; |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | nsresult |
michael@0 | 19 | GfxInfo::GetDWriteEnabled(bool *aEnabled) |
michael@0 | 20 | { |
michael@0 | 21 | return NS_ERROR_FAILURE; |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | /* readonly attribute DOMString DWriteVersion; */ |
michael@0 | 25 | NS_IMETHODIMP |
michael@0 | 26 | GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) |
michael@0 | 27 | { |
michael@0 | 28 | return NS_ERROR_FAILURE; |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | /* readonly attribute DOMString cleartypeParameters; */ |
michael@0 | 32 | NS_IMETHODIMP |
michael@0 | 33 | GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) |
michael@0 | 34 | { |
michael@0 | 35 | return NS_ERROR_FAILURE; |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | /* readonly attribute DOMString adapterDescription; */ |
michael@0 | 39 | NS_IMETHODIMP |
michael@0 | 40 | GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) |
michael@0 | 41 | { |
michael@0 | 42 | aAdapterDescription.AssignLiteral(""); |
michael@0 | 43 | return NS_OK; |
michael@0 | 44 | } |
michael@0 | 45 | |
michael@0 | 46 | /* readonly attribute DOMString adapterDescription2; */ |
michael@0 | 47 | NS_IMETHODIMP |
michael@0 | 48 | GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) |
michael@0 | 49 | { |
michael@0 | 50 | return NS_ERROR_FAILURE; |
michael@0 | 51 | } |
michael@0 | 52 | |
michael@0 | 53 | /* readonly attribute DOMString adapterRAM; */ |
michael@0 | 54 | NS_IMETHODIMP |
michael@0 | 55 | GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) |
michael@0 | 56 | { |
michael@0 | 57 | aAdapterRAM.AssignLiteral(""); |
michael@0 | 58 | return NS_OK; |
michael@0 | 59 | } |
michael@0 | 60 | |
michael@0 | 61 | /* readonly attribute DOMString adapterRAM2; */ |
michael@0 | 62 | NS_IMETHODIMP |
michael@0 | 63 | GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) |
michael@0 | 64 | { |
michael@0 | 65 | return NS_ERROR_FAILURE; |
michael@0 | 66 | } |
michael@0 | 67 | |
michael@0 | 68 | /* readonly attribute DOMString adapterDriver; */ |
michael@0 | 69 | NS_IMETHODIMP |
michael@0 | 70 | GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) |
michael@0 | 71 | { |
michael@0 | 72 | aAdapterDriver.AssignLiteral(""); |
michael@0 | 73 | return NS_OK; |
michael@0 | 74 | } |
michael@0 | 75 | |
michael@0 | 76 | /* readonly attribute DOMString adapterDriver2; */ |
michael@0 | 77 | NS_IMETHODIMP |
michael@0 | 78 | GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) |
michael@0 | 79 | { |
michael@0 | 80 | return NS_ERROR_FAILURE; |
michael@0 | 81 | } |
michael@0 | 82 | |
michael@0 | 83 | /* readonly attribute DOMString adapterDriverVersion; */ |
michael@0 | 84 | NS_IMETHODIMP |
michael@0 | 85 | GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) |
michael@0 | 86 | { |
michael@0 | 87 | aAdapterDriverVersion.AssignLiteral(""); |
michael@0 | 88 | return NS_OK; |
michael@0 | 89 | } |
michael@0 | 90 | |
michael@0 | 91 | /* readonly attribute DOMString adapterDriverVersion2; */ |
michael@0 | 92 | NS_IMETHODIMP |
michael@0 | 93 | GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) |
michael@0 | 94 | { |
michael@0 | 95 | return NS_ERROR_FAILURE; |
michael@0 | 96 | } |
michael@0 | 97 | |
michael@0 | 98 | /* readonly attribute DOMString adapterDriverDate; */ |
michael@0 | 99 | NS_IMETHODIMP |
michael@0 | 100 | GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) |
michael@0 | 101 | { |
michael@0 | 102 | aAdapterDriverDate.AssignLiteral(""); |
michael@0 | 103 | return NS_OK; |
michael@0 | 104 | } |
michael@0 | 105 | |
michael@0 | 106 | /* readonly attribute DOMString adapterDriverDate2; */ |
michael@0 | 107 | NS_IMETHODIMP |
michael@0 | 108 | GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) |
michael@0 | 109 | { |
michael@0 | 110 | return NS_ERROR_FAILURE; |
michael@0 | 111 | } |
michael@0 | 112 | |
michael@0 | 113 | /* readonly attribute DOMString adapterVendorID; */ |
michael@0 | 114 | NS_IMETHODIMP |
michael@0 | 115 | GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) |
michael@0 | 116 | { |
michael@0 | 117 | aAdapterVendorID.AssignLiteral(""); |
michael@0 | 118 | return NS_OK; |
michael@0 | 119 | } |
michael@0 | 120 | |
michael@0 | 121 | /* readonly attribute DOMString adapterVendorID2; */ |
michael@0 | 122 | NS_IMETHODIMP |
michael@0 | 123 | GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) |
michael@0 | 124 | { |
michael@0 | 125 | return NS_ERROR_FAILURE; |
michael@0 | 126 | } |
michael@0 | 127 | |
michael@0 | 128 | /* readonly attribute DOMString adapterDeviceID; */ |
michael@0 | 129 | NS_IMETHODIMP |
michael@0 | 130 | GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) |
michael@0 | 131 | { |
michael@0 | 132 | aAdapterDeviceID.AssignLiteral(""); |
michael@0 | 133 | return NS_OK; |
michael@0 | 134 | } |
michael@0 | 135 | |
michael@0 | 136 | /* readonly attribute DOMString adapterDeviceID2; */ |
michael@0 | 137 | NS_IMETHODIMP |
michael@0 | 138 | GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) |
michael@0 | 139 | { |
michael@0 | 140 | return NS_ERROR_FAILURE; |
michael@0 | 141 | } |
michael@0 | 142 | |
michael@0 | 143 | /* readonly attribute boolean isGPU2Active; */ |
michael@0 | 144 | NS_IMETHODIMP |
michael@0 | 145 | GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) |
michael@0 | 146 | { |
michael@0 | 147 | return NS_ERROR_FAILURE; |
michael@0 | 148 | } |
michael@0 | 149 | |
michael@0 | 150 | const nsTArray<GfxDriverInfo>& |
michael@0 | 151 | GfxInfo::GetGfxDriverInfo() |
michael@0 | 152 | { |
michael@0 | 153 | return *mDriverInfo; |
michael@0 | 154 | } |
michael@0 | 155 | |
michael@0 | 156 | uint32_t GfxInfo::OperatingSystemVersion() |
michael@0 | 157 | { |
michael@0 | 158 | return 0; |
michael@0 | 159 | } |
michael@0 | 160 | |
michael@0 | 161 | nsresult |
michael@0 | 162 | GfxInfo::GetFeatureStatusImpl(int32_t /*aFeature*/, |
michael@0 | 163 | int32_t *aStatus, |
michael@0 | 164 | nsAString & /*aSuggestedDriverVersion*/, |
michael@0 | 165 | const nsTArray<GfxDriverInfo>& /*aDriverInfo*/, |
michael@0 | 166 | OperatingSystem* /*aOS*/ /* = nullptr */) |
michael@0 | 167 | { |
michael@0 | 168 | NS_ENSURE_ARG_POINTER(aStatus); |
michael@0 | 169 | *aStatus = nsIGfxInfo::FEATURE_NO_INFO; |
michael@0 | 170 | |
michael@0 | 171 | return NS_OK; |
michael@0 | 172 | } |
michael@0 | 173 | |
michael@0 | 174 | #ifdef DEBUG |
michael@0 | 175 | |
michael@0 | 176 | // Implement nsIGfxInfoDebug |
michael@0 | 177 | |
michael@0 | 178 | /* void spoofVendorID (in DOMString aVendorID); */ |
michael@0 | 179 | NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString &) |
michael@0 | 180 | { |
michael@0 | 181 | return NS_OK; |
michael@0 | 182 | } |
michael@0 | 183 | |
michael@0 | 184 | /* void spoofDeviceID (in unsigned long aDeviceID); */ |
michael@0 | 185 | NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString &) |
michael@0 | 186 | { |
michael@0 | 187 | return NS_OK; |
michael@0 | 188 | } |
michael@0 | 189 | |
michael@0 | 190 | /* void spoofDriverVersion (in DOMString aDriverVersion); */ |
michael@0 | 191 | NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString &) |
michael@0 | 192 | { |
michael@0 | 193 | return NS_OK; |
michael@0 | 194 | } |
michael@0 | 195 | |
michael@0 | 196 | /* void spoofOSVersion (in unsigned long aVersion); */ |
michael@0 | 197 | NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t) |
michael@0 | 198 | { |
michael@0 | 199 | return NS_OK; |
michael@0 | 200 | } |
michael@0 | 201 | |
michael@0 | 202 | #endif |