Bumping manifests a=b2g-bump
[gecko.git] / widget / cocoa / GfxInfo.h
blob7c409993927642d1c96d7f0ef32e17672d1860d5
1 /* vim: se cin sw=2 ts=2 et : */
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef __mozilla_widget_GfxInfo_h__
9 #define __mozilla_widget_GfxInfo_h__
11 #include "GfxInfoBase.h"
12 #include "nsIGfxInfo2.h"
14 #include "nsString.h"
16 namespace mozilla {
17 namespace widget {
19 class GfxInfo : public GfxInfoBase
21 public:
23 GfxInfo();
24 // We only declare the subset of nsIGfxInfo that we actually implement. The
25 // rest is brought forward from GfxInfoBase.
26 NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled) MOZ_OVERRIDE;
27 NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled) MOZ_OVERRIDE;
28 NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion) MOZ_OVERRIDE;
29 NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams) MOZ_OVERRIDE;
30 NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription) MOZ_OVERRIDE;
31 NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver) MOZ_OVERRIDE;
32 NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID) MOZ_OVERRIDE;
33 NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID) MOZ_OVERRIDE;
34 NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID) MOZ_OVERRIDE;
35 NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM) MOZ_OVERRIDE;
36 NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) MOZ_OVERRIDE;
37 NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate) MOZ_OVERRIDE;
38 NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription) MOZ_OVERRIDE;
39 NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver) MOZ_OVERRIDE;
40 NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID) MOZ_OVERRIDE;
41 NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID) MOZ_OVERRIDE;
42 NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID) MOZ_OVERRIDE;
43 NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM) MOZ_OVERRIDE;
44 NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) MOZ_OVERRIDE;
45 NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate) MOZ_OVERRIDE;
46 NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active) MOZ_OVERRIDE;
48 using GfxInfoBase::GetFeatureStatus;
49 using GfxInfoBase::GetFeatureSuggestedDriverVersion;
50 using GfxInfoBase::GetWebGLParameter;
52 virtual nsresult Init() MOZ_OVERRIDE;
54 NS_DECL_ISUPPORTS_INHERITED
55 #ifdef DEBUG
56 NS_DECL_NSIGFXINFODEBUG
57 #endif
58 NS_DECL_NSIGFXINFO2
60 virtual uint32_t OperatingSystemVersion() MOZ_OVERRIDE { return mOSXVersion; }
62 protected:
64 virtual ~GfxInfo() {}
66 virtual nsresult GetFeatureStatusImpl(int32_t aFeature,
67 int32_t *aStatus,
68 nsAString & aSuggestedDriverVersion,
69 const nsTArray<GfxDriverInfo>& aDriverInfo,
70 OperatingSystem* aOS = nullptr) MOZ_OVERRIDE;
71 virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo() MOZ_OVERRIDE;
73 private:
75 void GetDeviceInfo();
76 void GetSelectedCityInfo();
77 void AddCrashReportAnnotations();
79 nsString mAdapterRAMString;
80 nsString mDeviceID;
81 nsString mDriverVersion;
82 nsString mDriverDate;
83 nsString mDeviceKey;
85 nsString mAdapterVendorID;
86 nsString mAdapterDeviceID;
88 nsString mCountryCode;
90 uint32_t mOSXVersion;
93 } // namespace widget
94 } // namespace mozilla
96 #endif /* __mozilla_widget_GfxInfo_h__ */