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

Side by Side Diff: base/android/parcelable_channel_client.cc

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 unified diff | Download patch
« no previous file with comments | « base/android/parcelable_channel_client.h ('k') | base/android/parcelable_channel_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/android/parcelable_channel_client.h"
6
7 #include "jni/ParcelableChannelClient_jni.h"
8
9 namespace base {
10 namespace android {
11
12 ParcelableChannelClient::ParcelableChannelClient() {}
13
14 ParcelableChannelClient::ParcelableChannelClient(
15 const base::android::JavaRef<jobject>& j_parcelable_channel)
16 : j_parcelable_channel_(j_parcelable_channel) {
17 DCHECK(!j_parcelable_channel_.is_null());
18 }
19
20 ParcelableChannelClient::ParcelableChannelClient(
21 ParcelableChannelClient&& other)
22 : j_parcelable_channel_(std::move(other.j_parcelable_channel_)) {}
23
24 ParcelableChannelClient& ParcelableChannelClient::operator=(
25 ParcelableChannelClient&& other) {
26 j_parcelable_channel_ = std::move(other.j_parcelable_channel_);
27 return *this;
28 }
29
30 void ParcelableChannelClient::SendParcelable(
31 uint32_t id,
32 base::android::ScopedJavaLocalRef<jobject> parcelable) {
33 DCHECK(!j_parcelable_channel_.is_null());
34
35 Java_ParcelableChannelClient_sendParcelable(
36 base::android::AttachCurrentThread(), j_parcelable_channel_, id,
37 parcelable);
38 }
39
40 } // namespace android
41 } // namespace base
OLDNEW
« no previous file with comments | « base/android/parcelable_channel_client.h ('k') | base/android/parcelable_channel_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698