1 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 2; -*- */
2 /* vim: set sw=4 ts=8 et tw=80 : */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_widget_ScreenProxy_h
8 #define mozilla_widget_ScreenProxy_h
10 #include "nsBaseScreen.h"
11 #include "mozilla/dom/PScreenManagerChild.h"
12 #include "mozilla/dom/TabChild.h"
14 class nsScreenManagerProxy
;
19 class ScreenProxy
: public nsBaseScreen
22 ScreenProxy(nsScreenManagerProxy
* aScreenManager
,
23 mozilla::dom::ScreenDetails aDetails
);
26 NS_IMETHOD
GetId(uint32_t* aId
) MOZ_OVERRIDE
;
28 NS_IMETHOD
GetRect(int32_t* aLeft
,
31 int32_t* aHeight
) MOZ_OVERRIDE
;
32 NS_IMETHOD
GetRectDisplayPix(int32_t* aLeft
,
35 int32_t* aHeight
) MOZ_OVERRIDE
;
36 NS_IMETHOD
GetAvailRect(int32_t* aLeft
,
39 int32_t* aHeight
) MOZ_OVERRIDE
;
40 NS_IMETHOD
GetAvailRectDisplayPix(int32_t* aLeft
,
43 int32_t* aHeight
) MOZ_OVERRIDE
;
44 NS_IMETHOD
GetPixelDepth(int32_t* aPixelDepth
) MOZ_OVERRIDE
;
45 NS_IMETHOD
GetColorDepth(int32_t* aColorDepth
) MOZ_OVERRIDE
;
49 void PopulateByDetails(mozilla::dom::ScreenDetails aDetails
);
50 bool EnsureCacheIsValid();
51 void InvalidateCacheOnNextTick();
52 void InvalidateCache();
54 double mContentsScaleFactor
;
55 nsRefPtr
<nsScreenManagerProxy
> mScreenManager
;
60 nsIntRect mRectDisplayPix
;
62 nsIntRect mAvailRectDisplayPix
;
64 bool mCacheWillInvalidate
;
68 } // namespace mozilla