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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 Core* GetCore() { return g_core; } | 38 Core* GetCore() { return g_core; } |
39 | 39 |
40 } // namespace internal | 40 } // namespace internal |
41 | 41 |
42 void SetMaxMessageSize(size_t bytes) { | 42 void SetMaxMessageSize(size_t bytes) { |
43 } | 43 } |
44 | 44 |
45 void SetParentPipeHandle(ScopedPlatformHandle pipe) { | 45 void SetParentPipeHandle(ScopedPlatformHandle pipe) { |
46 CHECK(internal::g_core); | 46 CHECK(internal::g_core); |
47 internal::g_core->InitChild(std::move(pipe)); | 47 internal::g_core->InitChild(ConnectionParam(std::move(pipe))); |
48 } | 48 } |
49 | 49 |
50 void SetParentPipeHandleFromCommandLine() { | 50 void SetParentPipeHandleFromCommandLine() { |
51 ScopedPlatformHandle platform_channel = | 51 ScopedPlatformHandle platform_channel = |
52 PlatformChannelPair::PassClientHandleFromParentProcess( | 52 PlatformChannelPair::PassClientHandleFromParentProcess( |
53 *base::CommandLine::ForCurrentProcess()); | 53 *base::CommandLine::ForCurrentProcess()); |
54 CHECK(platform_channel.is_valid()); | 54 CHECK(platform_channel.is_valid()); |
55 SetParentPipeHandle(std::move(platform_channel)); | 55 SetParentPipeHandle(std::move(platform_channel)); |
56 } | 56 } |
57 | 57 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return base::HexEncode(random_bytes, 16); | 149 return base::HexEncode(random_bytes, 16); |
150 } | 150 } |
151 | 151 |
152 MojoResult SetProperty(MojoPropertyType type, const void* value) { | 152 MojoResult SetProperty(MojoPropertyType type, const void* value) { |
153 CHECK(internal::g_core); | 153 CHECK(internal::g_core); |
154 return internal::g_core->SetProperty(type, value); | 154 return internal::g_core->SetProperty(type, value); |
155 } | 155 } |
156 | 156 |
157 } // namespace edk | 157 } // namespace edk |
158 } // namespace mojo | 158 } // namespace mojo |
OLD | NEW |