no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / mozglue / misc / ProcessType.h
blob890ed4faacf12adcedd439afd77072d3883d51b3
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef IPC_PROCESSTYPE_H_
8 #define IPC_PROCESSTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/Types.h"
13 // This enum is not dense. See GeckoProcessTypes.h for details.
14 enum GeckoProcessType {
15 #define GECKO_PROCESS_TYPE(enum_value, enum_name, string_name, proc_typename, \
16 process_bin_type, procinfo_typename, \
17 webidl_typename, allcaps_name) \
18 GeckoProcessType_##enum_name = (enum_value),
19 #include "mozilla/GeckoProcessTypes.h"
20 #undef GECKO_PROCESS_TYPE
21 GeckoProcessType_End,
22 GeckoProcessType_Invalid = GeckoProcessType_End
25 namespace mozilla {
26 namespace startup {
27 extern MFBT_DATA GeckoProcessType sChildProcessType;
28 } // namespace startup
30 /**
31 * @return the GeckoProcessType of the current process.
33 MOZ_ALWAYS_INLINE GeckoProcessType GetGeckoProcessType() {
34 return startup::sChildProcessType;
37 /**
38 * Set the gecko process type based on a null-terminated byte string.
40 MFBT_API void SetGeckoProcessType(const char* aProcessTypeString);
42 } // namespace mozilla
44 #endif // IPC_PROCESSTYPE_H_