| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_EDK_SYSTEM_SIMPLE_BROKER_H_ | |
| 6 #define MOJO_EDK_SYSTEM_SIMPLE_BROKER_H_ | |
| 7 | |
| 8 #include "mojo/edk/system/broker.h" | |
| 9 | |
| 10 namespace mojo { | |
| 11 namespace edk { | |
| 12 | |
| 13 // A simple implementation of Broker interface. This isn't meant for production | |
| 14 // use (i.e. with multi-process, sandboxes). It's provided for use by unittests. | |
| 15 // Implementation note: this default implementation works across processes | |
| 16 // without a sandbox. | |
| 17 class MOJO_SYSTEM_IMPL_EXPORT SimpleBroker : public Broker { | |
| 18 public: | |
| 19 SimpleBroker(); | |
| 20 ~SimpleBroker() override; | |
| 21 | |
| 22 // Broker implementation: | |
| 23 #if defined(OS_WIN) | |
| 24 void CreatePlatformChannelPair(ScopedPlatformHandle* server, | |
| 25 ScopedPlatformHandle* client) override; | |
| 26 void HandleToToken(const PlatformHandle* platform_handles, | |
| 27 size_t count, | |
| 28 uint64_t* tokens) override; | |
| 29 void TokenToHandle(const uint64_t* tokens, | |
| 30 size_t count, | |
| 31 PlatformHandle* handles) override; | |
| 32 #endif | |
| 33 }; | |
| 34 | |
| 35 } // namespace edk | |
| 36 } // namespace mojo | |
| 37 | |
| 38 #endif // MOJO_EDK_SYSTEM_SIMPLE_BROKER_H_ | |
| OLD | NEW |