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/. */
6 #ifndef __nsAppShellService_h
7 #define __nsAppShellService_h
9 #include "nsIAppShellService.h"
10 #include "nsIObserver.h"
13 #include "AppWindow.h"
14 #include "nsStringFwd.h"
15 #include "nsIRemoteTab.h"
16 #include "mozilla/Attributes.h"
18 // {0099907D-123C-4853-A46A-43098B5FB68C}
19 #define NS_APPSHELLSERVICE_CID \
21 0x99907d, 0x123c, 0x4853, { \
22 0xa4, 0x6a, 0x43, 0x9, 0x8b, 0x5f, 0xb6, 0x8c \
26 class nsAppShellService final
: public nsIAppShellService
, public nsIObserver
{
29 NS_DECL_NSIAPPSHELLSERVICE
37 void EnsureHiddenWindow();
39 nsresult
JustCreateTopWindow(nsIAppWindow
* aParent
, nsIURI
* aUrl
,
40 uint32_t aChromeMask
, int32_t aInitialWidth
,
41 int32_t aInitialHeight
, bool aIsHiddenWindow
,
42 mozilla::AppWindow
** aResult
);
43 uint32_t CalculateWindowZLevel(nsIAppWindow
* aParent
, uint32_t aChromeMask
);
45 RefPtr
<mozilla::AppWindow
> mHiddenWindow
;
46 bool mXPCOMWillShutDown
;
47 bool mXPCOMShuttingDown
;
48 uint16_t mModalWindowCount
;
49 bool mApplicationProvidedHiddenWindow
;