|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #include "nsISupports.idl" |
|
6 |
|
7 %{C++ |
|
8 |
|
9 namespace mozilla { |
|
10 // Simple C++ getter for nsIXULRuntime::browserTabsRemote |
|
11 bool BrowserTabsRemote(); |
|
12 } |
|
13 |
|
14 %} |
|
15 |
|
16 /** |
|
17 * Provides information about the XUL runtime. |
|
18 * @status UNSTABLE - This interface is not frozen and will probably change in |
|
19 * future releases. If you need this functionality to be |
|
20 * stable/frozen, please contact Benjamin Smedberg. |
|
21 */ |
|
22 |
|
23 [scriptable, uuid(e080b1f6-8452-4bde-9368-c795808b86d1)] |
|
24 interface nsIXULRuntime : nsISupports |
|
25 { |
|
26 /** |
|
27 * Whether the application was launched in safe mode. |
|
28 */ |
|
29 readonly attribute boolean inSafeMode; |
|
30 |
|
31 /** |
|
32 * Whether to write console errors to a log file. If a component |
|
33 * encounters startup errors that might prevent the app from showing |
|
34 * proper UI, it should set this flag to "true". |
|
35 */ |
|
36 attribute boolean logConsoleErrors; |
|
37 |
|
38 /** |
|
39 * A string tag identifying the current operating system. This is taken |
|
40 * from the OS_TARGET configure variable. It will always be available. |
|
41 */ |
|
42 readonly attribute AUTF8String OS; |
|
43 |
|
44 /** |
|
45 * A string tag identifying the binary ABI of the current processor and |
|
46 * compiler vtable. This is taken from the TARGET_XPCOM_ABI configure |
|
47 * variable. It may not be available on all platforms, especially |
|
48 * unusual processor or compiler combinations. |
|
49 * |
|
50 * The result takes the form <processor>-<compilerABI>, for example: |
|
51 * x86-msvc |
|
52 * ppc-gcc3 |
|
53 * |
|
54 * This value should almost always be used in combination with "OS". |
|
55 * |
|
56 * @throw NS_ERROR_NOT_AVAILABLE if not available. |
|
57 */ |
|
58 readonly attribute AUTF8String XPCOMABI; |
|
59 |
|
60 /** |
|
61 * A string tag identifying the target widget toolkit in use. |
|
62 * This is taken from the MOZ_WIDGET_TOOLKIT configure variable. |
|
63 */ |
|
64 readonly attribute AUTF8String widgetToolkit; |
|
65 |
|
66 /** |
|
67 * The legal values of processType. |
|
68 */ |
|
69 const unsigned long PROCESS_TYPE_DEFAULT = 0; |
|
70 const unsigned long PROCESS_TYPE_PLUGIN = 1; |
|
71 const unsigned long PROCESS_TYPE_CONTENT = 2; |
|
72 const unsigned long PROCESS_TYPE_IPDLUNITTEST = 3; |
|
73 |
|
74 /** |
|
75 * The type of the caller's process. Returns one of the values above. |
|
76 */ |
|
77 readonly attribute unsigned long processType; |
|
78 |
|
79 /** |
|
80 * The system process ID of the caller's process. |
|
81 */ |
|
82 readonly attribute unsigned long processID; |
|
83 |
|
84 /** |
|
85 * If true, browser tabs may be opened in a different process from the main |
|
86 * browser UI. |
|
87 */ |
|
88 readonly attribute boolean browserTabsRemote; |
|
89 |
|
90 /** |
|
91 * Signal the apprunner to invalidate caches on the next restart. |
|
92 * This will cause components to be autoregistered and all |
|
93 * fastload data to be re-created. |
|
94 */ |
|
95 void invalidateCachesOnRestart(); |
|
96 |
|
97 /** |
|
98 * Starts a child process. This method is intented to pre-start a |
|
99 * content child process so that when it is actually needed, it is |
|
100 * ready to go. |
|
101 * |
|
102 * @throw NS_ERROR_NOT_AVAILABLE if not available. |
|
103 */ |
|
104 void ensureContentProcess(); |
|
105 |
|
106 /** |
|
107 * Modification time of the profile lock before the profile was locked on |
|
108 * this startup. Used to know the last time the profile was used and not |
|
109 * closed cleanly. This is set to 0 if there was no existing profile lock. |
|
110 */ |
|
111 readonly attribute PRTime replacedLockTime; |
|
112 |
|
113 /** |
|
114 * Local ID of the minidump generated when the process crashed |
|
115 * on the previous run. Can be passed directly to CrashSubmit.submit. |
|
116 */ |
|
117 readonly attribute DOMString lastRunCrashID; |
|
118 |
|
119 /** |
|
120 * True if this is a RELEASE_BUILD. |
|
121 */ |
|
122 readonly attribute boolean isReleaseBuild; |
|
123 |
|
124 /** |
|
125 * True if this build uses official branding (MOZ_OFFICIAL_BRANDING). |
|
126 */ |
|
127 readonly attribute boolean isOfficialBranding; |
|
128 |
|
129 /** |
|
130 * The default update channel (MOZ_UPDATE_CHANNEL). |
|
131 */ |
|
132 readonly attribute AUTF8String defaultUpdateChannel; |
|
133 |
|
134 /** |
|
135 * The distribution ID for this build (MOZ_DISTRIBUTION_ID). |
|
136 */ |
|
137 readonly attribute AUTF8String distributionID; |
|
138 }; |