Bumping manifests a=b2g-bump
[gecko.git] / dom / ipc / ScreenManagerParent.h
blob3e51528ad0ee35ac88e80ebd53584b1890532727
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_dom_ScreenManagerParent_h
8 #define mozilla_dom_ScreenManagerParent_h
10 #include "mozilla/dom/PScreenManagerParent.h"
11 #include "nsIScreenManager.h"
13 namespace mozilla {
14 namespace dom {
16 class ScreenManagerParent : public PScreenManagerParent
18 public:
19 ScreenManagerParent(uint32_t* aNumberOfScreens,
20 float* aSystemDefaultScale,
21 bool* aSuccess);
22 ~ScreenManagerParent() {};
24 virtual bool AnswerRefresh(uint32_t* aNumberOfScreens,
25 float* aSystemDefaultScale,
26 bool* aSuccess) MOZ_OVERRIDE;
28 virtual bool AnswerScreenRefresh(const uint32_t& aId,
29 ScreenDetails* aRetVal,
30 bool* aSuccess) MOZ_OVERRIDE;
32 virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
34 virtual bool AnswerGetPrimaryScreen(ScreenDetails* aRetVal,
35 bool* aSuccess) MOZ_OVERRIDE;
37 virtual bool AnswerScreenForRect(const int32_t& aLeft,
38 const int32_t& aTop,
39 const int32_t& aWidth,
40 const int32_t& aHeight,
41 ScreenDetails* aRetVal,
42 bool* aSuccess) MOZ_OVERRIDE;
44 virtual bool AnswerScreenForBrowser(PBrowserParent* aBrowser,
45 ScreenDetails* aRetVal,
46 bool* aSuccess);
48 private:
49 bool ExtractScreenDetails(nsIScreen* aScreen, ScreenDetails &aDetails);
50 nsCOMPtr<nsIScreenManager> mScreenMgr;
53 } // namespace dom
54 } // namespace mozilla
56 #endif // mozilla_dom_ScreenManagerParent_h