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