Bug 1839489 [wpt PR 40652] - Revert "Add the Sec-CH-UA-Form-Factor header", a=testonly
[gecko.git] / toolkit / xre / nsINativeAppSupport.idl
blob7cfce02ab4ff981b455b4b3396817ca9690c3fef
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 #include "nsISupports.idl"
8 /* nsINativeAppSupport
10 * This "pseudo" (in the XPCOM sense) interface provides for
11 * platform-specific general application support
13 * Due to the nature of the beast, this interface is not a full-blown
14 * XPCOM component. The primary reason is that objects that implement
15 * this interface generally must be operational *before* XPCOM (or any
16 * of the rest of Mozilla) are initialized. As a result, this
17 * interface is instantiated by somewhat unconventional means.
19 * To create the implementor of this interface, you call the function
20 * NS_CreateNativeAppSupport. This is done in the startup code
21 * in nsAppRunner.cpp
23 * The interface provides these functions:
24 * start - You call this to inform the native app support that the
25 * application is starting. In addition, it serves as a
26 * query as to whether the application should continue to
27 * run.
29 * If the returned boolean result is PR_FALSE, then the
30 * application should exit without further processing. In
31 * such cases, the returned nsresult indicates whether the
32 * reason to exit is due to an error or not.
34 * Win32 Note: In the case of starting a second instance
35 * of this executable, this function will return
36 * PR_FALSE and nsresult==NS_OK. This means that
37 * the command line arguments have been
38 * successfully passed to the instance of the
39 * application acting as a remote server.
40 * quit - Informs the native app support that the application is stopping. The
41 * app support should disable any functionality enabled by start.
43 * onLastWindowClosing - Called when the last window is closed. Used as a
44 * "soft" shutdown, passwords are flushed.
47 [scriptable, uuid(5fdf8480-1f98-11d4-8077-00600811a9c3)]
48 interface nsINativeAppSupport : nsISupports {
49 // Startup/shutdown.
50 boolean start();
51 void enable();
53 void onLastWindowClosing();
54 void ReOpen();