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

Unified Diff: content/common/service_port_type_converters.cc

Issue 1192713004: Update client side navigator.connect API to use ServicePortCollection [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 6 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: content/common/service_port_type_converters.cc
diff --git a/content/common/service_port_type_converters.cc b/content/common/service_port_type_converters.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b47b0cd97239fe7436703938b8631f241ce12f7d
--- /dev/null
+++ b/content/common/service_port_type_converters.cc
@@ -0,0 +1,32 @@
+// 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.
+
+#include "content/common/service_port_type_converters.h"
+
+namespace mojo {
+
+// static
+content::TransferredMessagePort
+TypeConverter<content::TransferredMessagePort,
+ content::MojoTransferredMessagePortPtr>::
+ Convert(const content::MojoTransferredMessagePortPtr& input) {
+ content::TransferredMessagePort output;
+ output.id = input->id;
+ output.send_messages_as_values = input->send_messages_as_values;
+ return output;
+}
+
+// static
+content::MojoTransferredMessagePortPtr
+TypeConverter<content::MojoTransferredMessagePortPtr,
+ content::TransferredMessagePort>::
+ Convert(const content::TransferredMessagePort& input) {
+ content::MojoTransferredMessagePortPtr output(
+ content::MojoTransferredMessagePort::New());
+ output->id = input.id;
+ output->send_messages_as_values = input.send_messages_as_values;
+ return output.Pass();
+}
+
+} // namespace mojo
« no previous file with comments | « content/common/service_port_type_converters.h ('k') | content/common/service_worker/service_worker_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698