Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: mojo/edk/system/master_impl.h

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/edk/system/master_impl.h
diff --git a/mojo/edk/system/master_impl.h b/mojo/edk/system/master_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d5bd8cf33bd81e3f8746e331b9bb2c30f3c9ffe
--- /dev/null
+++ b/mojo/edk/system/master_impl.h
@@ -0,0 +1,43 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EDK_SYSTEM_MASTER_IMPL_H_
+#define MOJO_EDK_SYSTEM_MASTER_IMPL_H_
+
+#include "base/process/process.h"
+#include "mojo/edk/system/master.mojom.h"
+#include "mojo/edk/system/system_impl_export.h"
+#include "mojo/public/cpp/system/macros.h"
+
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
+namespace mojo {
+namespace edk {
+
+// An instance of this class exists in the maste process for each slave process.
+class MOJO_SYSTEM_IMPL_EXPORT MasterImpl : public Master {
+ public:
+ explicit MasterImpl(base::ProcessId slave_pid);
+ ~MasterImpl() override;
+
+ // Master implementation:
+ void HandleToToken(ScopedHandle platform_handle,
+ const HandleToTokenCallback& callback) override;
+ void TokenToHandle(uint64_t token,
+ const TokenToHandleCallback& callback) override;
+
+ private:
+#if defined(OS_WIN)
+ base::Process slave_process_;
+#endif
+
+ MOJO_DISALLOW_COPY_AND_ASSIGN(MasterImpl);
+};
+
+} // namespace edk
+} // namespace mojo
+
+#endif // MOJO_EDK_SYSTEM_MASTER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698