OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 5 #ifndef THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
6 #define THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 6 #define THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/process/process_handle.h" |
13 #include "base/task_runner.h" | 14 #include "base/task_runner.h" |
14 #include "mojo/public/cpp/system/message_pipe.h" | 15 #include "mojo/public/cpp/system/message_pipe.h" |
15 #include "third_party/mojo/src/mojo/edk/embedder/channel_info_forward.h" | 16 #include "third_party/mojo/src/mojo/edk/embedder/channel_info_forward.h" |
16 #include "third_party/mojo/src/mojo/edk/embedder/process_type.h" | 17 #include "third_party/mojo/src/mojo/edk/embedder/process_type.h" |
17 #include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h" | 18 #include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h" |
18 #include "third_party/mojo/src/mojo/edk/embedder/slave_info.h" | 19 #include "third_party/mojo/src/mojo/edk/embedder/slave_info.h" |
19 #include "third_party/mojo/src/mojo/edk/system/system_impl_export.h" | 20 #include "third_party/mojo/src/mojo/edk/system/system_impl_export.h" |
20 | 21 |
21 namespace mojo { | 22 namespace mojo { |
22 namespace edk { | |
23 class TokenSerializer; | |
24 } | |
25 | 23 |
26 namespace embedder { | 24 namespace embedder { |
27 | 25 |
28 class ProcessDelegate; | 26 class ProcessDelegate; |
29 | 27 |
30 #if defined(OS_WIN) | |
31 // Wrapper functions around the ones in src/mojo/edk for component builds. | 28 // Wrapper functions around the ones in src/mojo/edk for component builds. |
32 MOJO_SYSTEM_IMPL_EXPORT void PreInitializeParentProcess(); | 29 MOJO_SYSTEM_IMPL_EXPORT void PreInitializeParentProcess(); |
33 MOJO_SYSTEM_IMPL_EXPORT void PreInitializeChildProcess(); | 30 MOJO_SYSTEM_IMPL_EXPORT void PreInitializeChildProcess(); |
34 MOJO_SYSTEM_IMPL_EXPORT HANDLE ChildProcessLaunched(HANDLE child_process); | 31 MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle ChildProcessLaunched( |
35 MOJO_SYSTEM_IMPL_EXPORT void ChildProcessLaunched(HANDLE child_process, | 32 base::ProcessHandle child_process); |
36 HANDLE server_pipe); | 33 MOJO_SYSTEM_IMPL_EXPORT void ChildProcessLaunched( |
37 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandle(HANDLE pipe); | 34 base::ProcessHandle child_process, ScopedPlatformHandle server_pipe); |
38 #endif | 35 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandle(ScopedPlatformHandle pipe); |
39 | 36 |
40 // Basic configuration/initialization ------------------------------------------ | 37 // Basic configuration/initialization ------------------------------------------ |
41 | 38 |
42 // |Init()| sets up the basic Mojo system environment, making the |Mojo...()| | 39 // |Init()| sets up the basic Mojo system environment, making the |Mojo...()| |
43 // functions available and functional. This is never shut down (except in tests | 40 // functions available and functional. This is never shut down (except in tests |
44 // -- see test_embedder.h). | 41 // -- see test_embedder.h). |
45 | 42 |
46 // Allows changing the default max message size. Must be called before Init. | 43 // Allows changing the default max message size. Must be called before Init. |
47 MOJO_SYSTEM_IMPL_EXPORT void SetMaxMessageSize(size_t bytes); | 44 MOJO_SYSTEM_IMPL_EXPORT void SetMaxMessageSize(size_t bytes); |
48 | 45 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 240 |
244 // Inform the channel that it will soon be destroyed (doing so is optional). | 241 // Inform the channel that it will soon be destroyed (doing so is optional). |
245 // This may be called from any thread, but the caller must ensure that this is | 242 // This may be called from any thread, but the caller must ensure that this is |
246 // called before |DestroyChannel()|. | 243 // called before |DestroyChannel()|. |
247 MOJO_SYSTEM_IMPL_EXPORT void WillDestroyChannelSoon(ChannelInfo* channel_info); | 244 MOJO_SYSTEM_IMPL_EXPORT void WillDestroyChannelSoon(ChannelInfo* channel_info); |
248 | 245 |
249 } // namespace embedder | 246 } // namespace embedder |
250 } // namespace mojo | 247 } // namespace mojo |
251 | 248 |
252 #endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 249 #endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
OLD | NEW |