widget/android/nsScreenManagerAndroid.h
author Kate McKinley <kmckinley@mozilla.com>
Thu, 17 Sep 2015 10:04:52 -0700
changeset 295814 2955c61e6ecfcf8ee76272191fdcb190c6d97951
parent 290729 05efc89f31eedc28dee03ade6419c41e76037575
child 359692 ddf5af982d8b7a4258b3a6e05ee4c76ce66af605
permissions -rw-r--r--
Bug 1196039 - Telemetry for certificate lifetime. r=rbarnes,vladan

/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsScreenManagerAndroid_h___
#define nsScreenManagerAndroid_h___

#include "nsCOMPtr.h"

#include "nsBaseScreen.h"
#include "nsIScreenManager.h"
#include "WidgetUtils.h"

class nsScreenAndroid final : public nsBaseScreen
{
public:
    nsScreenAndroid(void *nativeScreen);
    ~nsScreenAndroid();

    NS_IMETHOD GetId(uint32_t* aId) override;
    NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
    NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
    NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth) override;
    NS_IMETHOD GetColorDepth(int32_t* aColorDepth) override;

protected:
    virtual void ApplyMinimumBrightness(uint32_t aBrightness) override;
};

class nsScreenManagerAndroid final : public nsIScreenManager
{
private:
    ~nsScreenManagerAndroid();

public:
    nsScreenManagerAndroid();

    NS_DECL_ISUPPORTS
    NS_DECL_NSISCREENMANAGER

protected:
    nsCOMPtr<nsIScreen> mOneScreen;
};

#endif /* nsScreenManagerAndroid_h___ */