1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2  * vim: sw=2 ts=8 et :
3  */
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/. */
7 
8 #define MOZ_FATAL_ASSERTIONS_FOR_THREAD_SAFETY
9 
10 #include "nsBaseScreen.h"
11 
NS_IMPL_ISUPPORTS(nsBaseScreen,nsIScreen)12 NS_IMPL_ISUPPORTS(nsBaseScreen, nsIScreen)
13 
14 nsBaseScreen::nsBaseScreen() {}
15 
~nsBaseScreen()16 nsBaseScreen::~nsBaseScreen() {}
17 
18 NS_IMETHODIMP
GetRectDisplayPix(int32_t * outLeft,int32_t * outTop,int32_t * outWidth,int32_t * outHeight)19 nsBaseScreen::GetRectDisplayPix(int32_t *outLeft, int32_t *outTop,
20                                 int32_t *outWidth, int32_t *outHeight) {
21   return GetRect(outLeft, outTop, outWidth, outHeight);
22 }
23 
24 NS_IMETHODIMP
GetAvailRectDisplayPix(int32_t * outLeft,int32_t * outTop,int32_t * outWidth,int32_t * outHeight)25 nsBaseScreen::GetAvailRectDisplayPix(int32_t *outLeft, int32_t *outTop,
26                                      int32_t *outWidth, int32_t *outHeight) {
27   return GetAvailRect(outLeft, outTop, outWidth, outHeight);
28 }
29 
30 NS_IMETHODIMP
GetContentsScaleFactor(double * aContentsScaleFactor)31 nsBaseScreen::GetContentsScaleFactor(double *aContentsScaleFactor) {
32   *aContentsScaleFactor = 1.0;
33   return NS_OK;
34 }
35 
36 NS_IMETHODIMP
GetDefaultCSSScaleFactor(double * aScaleFactor)37 nsBaseScreen::GetDefaultCSSScaleFactor(double *aScaleFactor) {
38   *aScaleFactor = 1.0;
39   return NS_OK;
40 }
41 
42 NS_IMETHODIMP
GetDpi(float * aDPI)43 nsBaseScreen::GetDpi(float *aDPI) {
44   *aDPI = 96;
45   return NS_OK;
46 }
47