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

Unified Diff: base/android/parcelable_channel_client.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 | « base/android/jni_array.cc ('k') | base/android/parcelable_channel_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/parcelable_channel_client.h
diff --git a/base/android/parcelable_channel_client.h b/base/android/parcelable_channel_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..3e987a12319011ecdae345af51c2f73ecc2d0e07
--- /dev/null
+++ b/base/android/parcelable_channel_client.h
@@ -0,0 +1,38 @@
+// 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 BASE_ANDROID_PARCELABLE_CHANNEL_CLIENT_H_
+#define BASE_ANDROID_PARCELABLE_CHANNEL_CLIENT_H_
+
+#include "base/android/scoped_java_ref.h"
+#include "base/base_export.h"
+
+namespace base {
+namespace android {
+
+class BASE_EXPORT ParcelableChannelClient {
+ public:
+ ParcelableChannelClient();
+ explicit ParcelableChannelClient(
+ const base::android::JavaRef<jobject>& j_parcelable_channel);
+
+ ParcelableChannelClient(ParcelableChannelClient&& other);
+ ParcelableChannelClient& operator=(ParcelableChannelClient&& other);
+
+ bool is_valid() const { return !j_parcelable_channel_.is_null(); }
+
+ // Sends the |parcelable| over the channel.
+ void SendParcelable(uint32_t id,
+ base::android::ScopedJavaLocalRef<jobject> parcelable);
+
+ private:
+ base::android::ScopedJavaGlobalRef<jobject> j_parcelable_channel_;
+
+ DISALLOW_COPY_AND_ASSIGN(ParcelableChannelClient);
+};
+
+} // namespace android
+} // namespace base
+
+#endif // #define BASE_ANDROID_PARCELABLE_CHANNEL_CLIENT_H_
« no previous file with comments | « base/android/jni_array.cc ('k') | base/android/parcelable_channel_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698