| 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 #include "mojo/edk/embedder/embedder.h" | 5 #include "mojo/edk/embedder/embedder.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 PlatformSupport* g_platform_support; | 32 PlatformSupport* g_platform_support; |
| 33 ProcessDelegate* g_process_delegate; | 33 ProcessDelegate* g_process_delegate; |
| 34 | 34 |
| 35 Core* GetCore() { return g_core; } | 35 Core* GetCore() { return g_core; } |
| 36 | 36 |
| 37 } // namespace internal | 37 } // namespace internal |
| 38 | 38 |
| 39 void SetMaxMessageSize(size_t bytes) { | 39 void SetMaxMessageSize(size_t bytes) { |
| 40 } | 40 } |
| 41 | 41 |
| 42 void PreInitializeParentProcess() { | |
| 43 } | |
| 44 | |
| 45 void PreInitializeChildProcess() { | |
| 46 } | |
| 47 | |
| 48 ScopedPlatformHandle ChildProcessLaunched(base::ProcessHandle child_process) { | 42 ScopedPlatformHandle ChildProcessLaunched(base::ProcessHandle child_process) { |
| 49 PlatformChannelPair channel; | 43 PlatformChannelPair channel; |
| 50 ChildProcessLaunched(child_process, channel.PassServerHandle()); | 44 ChildProcessLaunched(child_process, channel.PassServerHandle()); |
| 51 return channel.PassClientHandle(); | 45 return channel.PassClientHandle(); |
| 52 } | 46 } |
| 53 | 47 |
| 54 void ChildProcessLaunched(base::ProcessHandle child_process, | 48 void ChildProcessLaunched(base::ProcessHandle child_process, |
| 55 ScopedPlatformHandle server_pipe) { | 49 ScopedPlatformHandle server_pipe) { |
| 56 CHECK(internal::g_core); | 50 CHECK(internal::g_core); |
| 57 internal::g_core->AddChild(child_process, std::move(server_pipe)); | 51 internal::g_core->AddChild(child_process, std::move(server_pipe)); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 116 } |
| 123 | 117 |
| 124 std::string GenerateRandomToken() { | 118 std::string GenerateRandomToken() { |
| 125 char random_bytes[16]; | 119 char random_bytes[16]; |
| 126 crypto::RandBytes(random_bytes, 16); | 120 crypto::RandBytes(random_bytes, 16); |
| 127 return base::HexEncode(random_bytes, 16); | 121 return base::HexEncode(random_bytes, 16); |
| 128 } | 122 } |
| 129 | 123 |
| 130 } // namespace edk | 124 } // namespace edk |
| 131 } // namespace mojo | 125 } // namespace mojo |
| OLD | NEW |