OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_EDK_EMBEDDER_PROCESS_TYPE_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_PROCESS_TYPE_H_ |
6 #define MOJO_EDK_EMBEDDER_PROCESS_TYPE_H_ | 6 #define MOJO_EDK_EMBEDDER_PROCESS_TYPE_H_ |
7 | 7 |
8 #include <ostream> | 8 #include <ostream> |
9 | 9 |
10 #include "mojo/edk/system/system_impl_export.h" | |
11 | |
12 namespace mojo { | 10 namespace mojo { |
13 namespace embedder { | 11 namespace embedder { |
14 | 12 |
15 enum class ProcessType { | 13 enum class ProcessType { |
16 // |InitIPCSupport()| has not been called (or |ShutdownIPCSupport()| has been | 14 // |InitIPCSupport()| has not been called (or |ShutdownIPCSupport()| has been |
17 // called). | 15 // called). |
18 UNINITIALIZED, | 16 UNINITIALIZED, |
19 // Process without connection management. | 17 // Process without connection management. |
20 NONE, | 18 NONE, |
21 // Master process. | 19 // Master process. |
22 MASTER, | 20 MASTER, |
23 // Slave process. | 21 // Slave process. |
24 SLAVE, | 22 SLAVE, |
25 }; | 23 }; |
26 | 24 |
27 // So logging macros and |DCHECK_EQ()|, etc. work. | 25 // So logging macros and |DCHECK_EQ()|, etc. work. |
28 MOJO_SYSTEM_IMPL_EXPORT inline std::ostream& operator<<( | 26 inline std::ostream& operator<<(std::ostream& out, ProcessType process_type) { |
29 std::ostream& out, | |
30 ProcessType process_type) { | |
31 return out << static_cast<int>(process_type); | 27 return out << static_cast<int>(process_type); |
32 } | 28 } |
33 | 29 |
34 } // namespace embedder | 30 } // namespace embedder |
35 } // namespace mojo | 31 } // namespace mojo |
36 | 32 |
37 #endif // MOJO_EDK_EMBEDDER_PROCESS_TYPE_H_ | 33 #endif // MOJO_EDK_EMBEDDER_PROCESS_TYPE_H_ |
OLD | NEW |