michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __nsAppShellService_h michael@0: #define __nsAppShellService_h michael@0: michael@0: #include "nsIAppShellService.h" michael@0: #include "nsIObserver.h" michael@0: michael@0: //Interfaces Needed michael@0: #include "nsWebShellWindow.h" michael@0: #include "nsStringFwd.h" michael@0: #include "nsAutoPtr.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: // {0099907D-123C-4853-A46A-43098B5FB68C} michael@0: #define NS_APPSHELLSERVICE_CID \ michael@0: { 0x99907d, 0x123c, 0x4853, { 0xa4, 0x6a, 0x43, 0x9, 0x8b, 0x5f, 0xb6, 0x8c } } michael@0: michael@0: class nsAppShellService MOZ_FINAL : public nsIAppShellService, michael@0: public nsIObserver michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIAPPSHELLSERVICE michael@0: NS_DECL_NSIOBSERVER michael@0: michael@0: nsAppShellService(); michael@0: michael@0: protected: michael@0: ~nsAppShellService(); michael@0: michael@0: nsresult CreateHiddenWindowHelper(bool aIsPrivate); michael@0: void EnsurePrivateHiddenWindow(); michael@0: michael@0: nsresult JustCreateTopWindow(nsIXULWindow *aParent, michael@0: nsIURI *aUrl, michael@0: uint32_t aChromeMask, michael@0: int32_t aInitialWidth, int32_t aInitialHeight, michael@0: bool aIsHiddenWindow, michael@0: nsWebShellWindow **aResult); michael@0: uint32_t CalculateWindowZLevel(nsIXULWindow *aParent, uint32_t aChromeMask); michael@0: michael@0: nsRefPtr mHiddenWindow; michael@0: nsRefPtr mHiddenPrivateWindow; michael@0: bool mXPCOMWillShutDown; michael@0: bool mXPCOMShuttingDown; michael@0: uint16_t mModalWindowCount; michael@0: bool mApplicationProvidedHiddenWindow; michael@0: }; michael@0: michael@0: #endif