nsAppShellService.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef __nsAppShellService_h
  6. #define __nsAppShellService_h
  7. #include "nsIAppShellService.h"
  8. #include "nsIObserver.h"
  9. //Interfaces Needed
  10. #include "nsWebShellWindow.h"
  11. #include "nsStringFwd.h"
  12. #include "nsAutoPtr.h"
  13. #include "nsITabParent.h"
  14. #include "mozilla/Attributes.h"
  15. // {0099907D-123C-4853-A46A-43098B5FB68C}
  16. #define NS_APPSHELLSERVICE_CID \
  17. { 0x99907d, 0x123c, 0x4853, { 0xa4, 0x6a, 0x43, 0x9, 0x8b, 0x5f, 0xb6, 0x8c } }
  18. class nsAppShellService final : public nsIAppShellService,
  19. public nsIObserver
  20. {
  21. public:
  22. NS_DECL_ISUPPORTS
  23. NS_DECL_NSIAPPSHELLSERVICE
  24. NS_DECL_NSIOBSERVER
  25. nsAppShellService();
  26. protected:
  27. ~nsAppShellService();
  28. nsresult CreateHiddenWindowHelper(bool aIsPrivate);
  29. void EnsurePrivateHiddenWindow();
  30. nsresult JustCreateTopWindow(nsIXULWindow *aParent,
  31. nsIURI *aUrl,
  32. uint32_t aChromeMask,
  33. int32_t aInitialWidth, int32_t aInitialHeight,
  34. bool aIsHiddenWindow,
  35. nsITabParent *aOpeningTab,
  36. mozIDOMWindowProxy *aOpenerWindow,
  37. nsWebShellWindow **aResult);
  38. uint32_t CalculateWindowZLevel(nsIXULWindow *aParent, uint32_t aChromeMask);
  39. RefPtr<nsWebShellWindow> mHiddenWindow;
  40. RefPtr<nsWebShellWindow> mHiddenPrivateWindow;
  41. bool mXPCOMWillShutDown;
  42. bool mXPCOMShuttingDown;
  43. uint16_t mModalWindowCount;
  44. bool mApplicationProvidedHiddenWindow;
  45. uint32_t mScreenId;
  46. };
  47. #endif