Bug 1715716 [wpt PR 29323] - Use unittest.mock instead of the mock package, a=testonly
[gecko.git] / widget / Screen.h
blob6f284b76c71c62f92d7e662be0feafc25c0cc3d5
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 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_Screen_h
8 #define mozilla_widget_Screen_h
10 #include "nsIScreen.h"
12 #include "Units.h"
14 namespace mozilla {
15 namespace dom {
16 class ScreenDetails;
17 } // namespace dom
18 } // namespace mozilla
20 namespace mozilla {
21 namespace widget {
23 class Screen final : public nsIScreen {
24 public:
25 NS_DECL_ISUPPORTS
26 NS_DECL_NSISCREEN
28 Screen(LayoutDeviceIntRect aRect, LayoutDeviceIntRect aAvailRect,
29 uint32_t aPixelDepth, uint32_t aColorDepth,
30 DesktopToLayoutDeviceScale aContentsScale,
31 CSSToLayoutDeviceScale aDefaultCssScale, float dpi);
32 explicit Screen(const mozilla::dom::ScreenDetails& aScreenDetails);
33 Screen(const Screen& aOther);
35 mozilla::dom::ScreenDetails ToScreenDetails();
37 private:
38 virtual ~Screen() = default;
40 LayoutDeviceIntRect mRect;
41 LayoutDeviceIntRect mAvailRect;
42 DesktopIntRect mRectDisplayPix;
43 DesktopIntRect mAvailRectDisplayPix;
44 uint32_t mPixelDepth;
45 uint32_t mColorDepth;
46 DesktopToLayoutDeviceScale mContentsScale;
47 CSSToLayoutDeviceScale mDefaultCssScale;
48 float mDPI;
51 } // namespace widget
52 } // namespace mozilla
54 #endif