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

Unified Diff: mojo/edk/embedder/parcelable_channel.h

Issue 2735113003: Changing SpawnChild to return a struct.
Patch Set: Created 3 years, 9 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
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/embedder/pending_process_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/parcelable_channel.h
diff --git a/mojo/edk/embedder/parcelable_channel.h b/mojo/edk/embedder/parcelable_channel.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ebb68dfae3c98d62d69441fff22840f8111f172
--- /dev/null
+++ b/mojo/edk/embedder/parcelable_channel.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef MOJO_EDK_EMBEDDER_PARCELABLE_CHANNEL_H_
+#define MOJO_EDK_EMBEDDER_PARCELABLE_CHANNEL_H_
+
+#include "base/android/scoped_java_ref.h"
+#include "mojo/edk/system/system_impl_export.h"
+
+namespace mojo {
+namespace edk {
+
+class MOJO_SYSTEM_IMPL_EXPORT ParcelableChannel {
+ public:
+ ParcelableChannel();
+ explicit ParcelableChannel(
+ const base::android::JavaRef<jobject>& j_parcelable_channel);
+
+ ParcelableChannel(ParcelableChannel&& other);
+ ParcelableChannel& operator=(ParcelableChannel&& other);
+
+ // Sends the |parcelable| over the channel.
+ // void SendParcelable(uint32_t id, base::android::ScopedJavaLocalRef<jobject>
+ // parcelable);
+ void SendParcelable(uint32_t id, jobject parcelable);
+
+ base::android::ScopedJavaLocalRef<jobject> GetParcelable(uint32_t id);
+
+ private:
+ base::android::ScopedJavaGlobalRef<jobject> j_parcelable_channel_;
+
+ DISALLOW_COPY_AND_ASSIGN(ParcelableChannel);
+};
+
+} // namespace edk
+} // namespace mojo
+
+#endif // #define MOJO_EDK_EMBEDDER_PARCELABLE_CHANNEL_H_
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/embedder/pending_process_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698