зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1355147 - Expose IsHeadless on GfxInfo. r=jrmuizel
Allows marionette to check if the browser is in headless mode. MozReview-Commit-ID: 2kaqO3HO9Ke
This commit is contained in:
Родитель
987400a824
Коммит
82161df837
|
@ -1472,6 +1472,13 @@ GfxInfoBase::GetWebRenderEnabled(bool* aWebRenderEnabled)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfoBase::GetIsHeadless(bool* aIsHeadless)
|
||||
{
|
||||
*aIsHeadless = gfxPlatform::IsHeadless();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfoBase::GetContentBackend(nsAString & aContentBackend)
|
||||
{
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
NS_IMETHOD GetContentBackend(nsAString & aContentBackend) override;
|
||||
NS_IMETHOD GetUsingGPUProcess(bool *aOutValue) override;
|
||||
NS_IMETHOD GetWebRenderEnabled(bool* aWebRenderEnabled) override;
|
||||
NS_IMETHOD GetIsHeadless(bool* aIsHeadless) override;
|
||||
|
||||
// Initialization function. If you override this, you must call this class's
|
||||
// version of Init first.
|
||||
|
|
|
@ -24,6 +24,7 @@ interface nsIGfxInfo : nsISupports
|
|||
*/
|
||||
readonly attribute DOMString ContentBackend;
|
||||
readonly attribute boolean WebRenderEnabled;
|
||||
readonly attribute boolean isHeadless;
|
||||
|
||||
// XXX: Switch to a list of devices, rather than explicitly numbering them.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче