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_ |