summaryrefslogtreecommitdiff
path: root/mojo/edk/embedder/connection_params.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/edk/embedder/connection_params.cc')
-rw-r--r--mojo/edk/embedder/connection_params.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/mojo/edk/embedder/connection_params.cc b/mojo/edk/embedder/connection_params.cc
new file mode 100644
index 0000000000..9b7ec54eb4
--- /dev/null
+++ b/mojo/edk/embedder/connection_params.cc
@@ -0,0 +1,28 @@
+// Copyright 2017 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.
+
+#include "mojo/edk/embedder/connection_params.h"
+
+#include <utility>
+
+namespace mojo {
+namespace edk {
+
+ConnectionParams::ConnectionParams(ScopedPlatformHandle channel)
+ : channel_(std::move(channel)) {}
+
+ConnectionParams::ConnectionParams(ConnectionParams&& param)
+ : channel_(std::move(param.channel_)) {}
+
+ConnectionParams& ConnectionParams::operator=(ConnectionParams&& param) {
+ channel_ = std::move(param.channel_);
+ return *this;
+}
+
+ScopedPlatformHandle ConnectionParams::TakeChannelHandle() {
+ return std::move(channel_);
+}
+
+} // namespace edk
+} // namespace mojo