|
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 |
|
6 #ifndef __nsAppShellService_h |
|
7 #define __nsAppShellService_h |
|
8 |
|
9 #include "nsIAppShellService.h" |
|
10 #include "nsIObserver.h" |
|
11 |
|
12 //Interfaces Needed |
|
13 #include "nsWebShellWindow.h" |
|
14 #include "nsStringFwd.h" |
|
15 #include "nsAutoPtr.h" |
|
16 #include "mozilla/Attributes.h" |
|
17 |
|
18 // {0099907D-123C-4853-A46A-43098B5FB68C} |
|
19 #define NS_APPSHELLSERVICE_CID \ |
|
20 { 0x99907d, 0x123c, 0x4853, { 0xa4, 0x6a, 0x43, 0x9, 0x8b, 0x5f, 0xb6, 0x8c } } |
|
21 |
|
22 class nsAppShellService MOZ_FINAL : public nsIAppShellService, |
|
23 public nsIObserver |
|
24 { |
|
25 public: |
|
26 NS_DECL_ISUPPORTS |
|
27 NS_DECL_NSIAPPSHELLSERVICE |
|
28 NS_DECL_NSIOBSERVER |
|
29 |
|
30 nsAppShellService(); |
|
31 |
|
32 protected: |
|
33 ~nsAppShellService(); |
|
34 |
|
35 nsresult CreateHiddenWindowHelper(bool aIsPrivate); |
|
36 void EnsurePrivateHiddenWindow(); |
|
37 |
|
38 nsresult JustCreateTopWindow(nsIXULWindow *aParent, |
|
39 nsIURI *aUrl, |
|
40 uint32_t aChromeMask, |
|
41 int32_t aInitialWidth, int32_t aInitialHeight, |
|
42 bool aIsHiddenWindow, |
|
43 nsWebShellWindow **aResult); |
|
44 uint32_t CalculateWindowZLevel(nsIXULWindow *aParent, uint32_t aChromeMask); |
|
45 |
|
46 nsRefPtr<nsWebShellWindow> mHiddenWindow; |
|
47 nsRefPtr<nsWebShellWindow> mHiddenPrivateWindow; |
|
48 bool mXPCOMWillShutDown; |
|
49 bool mXPCOMShuttingDown; |
|
50 uint16_t mModalWindowCount; |
|
51 bool mApplicationProvidedHiddenWindow; |
|
52 }; |
|
53 |
|
54 #endif |