xpcom/system/nsIXULRuntime.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/system/nsIXULRuntime.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,138 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +%{C++
    1.11 +
    1.12 +namespace mozilla {
    1.13 +// Simple C++ getter for nsIXULRuntime::browserTabsRemote
    1.14 +bool BrowserTabsRemote();
    1.15 +}
    1.16 +
    1.17 +%}
    1.18 +
    1.19 +/**
    1.20 + * Provides information about the XUL runtime.
    1.21 + * @status UNSTABLE - This interface is not frozen and will probably change in
    1.22 + *                    future releases. If you need this functionality to be
    1.23 + *                    stable/frozen, please contact Benjamin Smedberg.
    1.24 + */
    1.25 +
    1.26 +[scriptable, uuid(e080b1f6-8452-4bde-9368-c795808b86d1)]
    1.27 +interface nsIXULRuntime : nsISupports
    1.28 +{
    1.29 +  /**
    1.30 +   * Whether the application was launched in safe mode.
    1.31 +   */
    1.32 +  readonly attribute boolean inSafeMode;
    1.33 +
    1.34 +  /**
    1.35 +   * Whether to write console errors to a log file. If a component
    1.36 +   * encounters startup errors that might prevent the app from showing
    1.37 +   * proper UI, it should set this flag to "true".
    1.38 +   */
    1.39 +  attribute boolean logConsoleErrors;
    1.40 +
    1.41 +  /**
    1.42 +   * A string tag identifying the current operating system. This is taken
    1.43 +   * from the OS_TARGET configure variable. It will always be available.
    1.44 +   */
    1.45 +  readonly attribute AUTF8String OS;
    1.46 +
    1.47 +  /**
    1.48 +   * A string tag identifying the binary ABI of the current processor and
    1.49 +   * compiler vtable. This is taken from the TARGET_XPCOM_ABI configure
    1.50 +   * variable. It may not be available on all platforms, especially
    1.51 +   * unusual processor or compiler combinations.
    1.52 +   *
    1.53 +   * The result takes the form <processor>-<compilerABI>, for example:
    1.54 +   *   x86-msvc
    1.55 +   *   ppc-gcc3
    1.56 +   *
    1.57 +   * This value should almost always be used in combination with "OS".
    1.58 +   *
    1.59 +   * @throw NS_ERROR_NOT_AVAILABLE if not available.
    1.60 +   */
    1.61 +  readonly attribute AUTF8String XPCOMABI;
    1.62 +
    1.63 +  /**
    1.64 +   * A string tag identifying the target widget toolkit in use.
    1.65 +   * This is taken from the MOZ_WIDGET_TOOLKIT configure variable.
    1.66 +   */
    1.67 +  readonly attribute AUTF8String widgetToolkit;
    1.68 +
    1.69 +  /**
    1.70 +   * The legal values of processType.
    1.71 +   */
    1.72 +  const unsigned long PROCESS_TYPE_DEFAULT = 0;
    1.73 +  const unsigned long PROCESS_TYPE_PLUGIN = 1;
    1.74 +  const unsigned long PROCESS_TYPE_CONTENT = 2;
    1.75 +  const unsigned long PROCESS_TYPE_IPDLUNITTEST = 3;
    1.76 +
    1.77 +  /**
    1.78 +   * The type of the caller's process.  Returns one of the values above.
    1.79 +   */
    1.80 +  readonly attribute unsigned long processType;
    1.81 +
    1.82 +  /**
    1.83 +   * The system process ID of the caller's process.
    1.84 +   */
    1.85 +  readonly attribute unsigned long processID;
    1.86 +
    1.87 +  /**
    1.88 +   * If true, browser tabs may be opened in a different process from the main
    1.89 +   * browser UI.
    1.90 +   */
    1.91 +  readonly attribute boolean browserTabsRemote;
    1.92 +
    1.93 +  /**
    1.94 +   * Signal the apprunner to invalidate caches on the next restart.
    1.95 +   * This will cause components to be autoregistered and all
    1.96 +   * fastload data to be re-created.
    1.97 +   */
    1.98 +  void invalidateCachesOnRestart();
    1.99 +
   1.100 +  /**
   1.101 +   * Starts a child process. This method is intented to pre-start a
   1.102 +   * content child process so that when it is actually needed, it is
   1.103 +   * ready to go.
   1.104 +   *
   1.105 +   * @throw NS_ERROR_NOT_AVAILABLE if not available.
   1.106 +   */
   1.107 +  void ensureContentProcess();
   1.108 +
   1.109 +  /**
   1.110 +   * Modification time of the profile lock before the profile was locked on
   1.111 +   * this startup. Used to know the last time the profile was used and not
   1.112 +   * closed cleanly. This is set to 0 if there was no existing profile lock.
   1.113 +   */
   1.114 +  readonly attribute PRTime replacedLockTime;
   1.115 +
   1.116 +  /**
   1.117 +   * Local ID of the minidump generated when the process crashed
   1.118 +   * on the previous run. Can be passed directly to CrashSubmit.submit.
   1.119 +   */
   1.120 +  readonly attribute DOMString lastRunCrashID;
   1.121 +
   1.122 +  /**
   1.123 +   * True if this is a RELEASE_BUILD.
   1.124 +   */
   1.125 +  readonly attribute boolean isReleaseBuild;
   1.126 +
   1.127 +  /**
   1.128 +   * True if this build uses official branding (MOZ_OFFICIAL_BRANDING).
   1.129 +   */
   1.130 +  readonly attribute boolean isOfficialBranding;
   1.131 +
   1.132 +  /**
   1.133 +   * The default update channel (MOZ_UPDATE_CHANNEL).
   1.134 +   */
   1.135 +  readonly attribute AUTF8String defaultUpdateChannel;
   1.136 +
   1.137 +  /**
   1.138 +   * The distribution ID for this build (MOZ_DISTRIBUTION_ID).
   1.139 +   */
   1.140 +  readonly attribute AUTF8String distributionID;
   1.141 +};

mercurial