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

Side by Side Diff: base/android/parcelable_channel_server.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_server.h ('k') | base/debug/stack_trace_unittest.cc » ('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_server.h"
6
7 #include "jni/ParcelableChannelServer_jni.h"
8
9 namespace base {
10 namespace android {
11
12 ParcelableChannelServer::ParcelableChannelServer() {}
13
14 ParcelableChannelServer::ParcelableChannelServer(
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 ParcelableChannelServer::ParcelableChannelServer(
21 ParcelableChannelServer&& other)
22 : j_parcelable_channel_(std::move(other.j_parcelable_channel_)) {}
23
24 ParcelableChannelServer& ParcelableChannelServer::operator=(
25 ParcelableChannelServer&& other) {
26 j_parcelable_channel_ = std::move(other.j_parcelable_channel_);
27 return *this;
28 }
29
30 base::android::ScopedJavaLocalRef<jobject>
31 ParcelableChannelServer::TakeParcelable(uint32_t id) {
32 DCHECK(!j_parcelable_channel_.is_null());
33
34 return Java_ParcelableChannelServer_takeParcelable(
35 base::android::AttachCurrentThread(), j_parcelable_channel_, id);
36 }
37
38 } // namespace android
39 } // namespace base
OLDNEW
« no previous file with comments | « base/android/parcelable_channel_server.h ('k') | base/debug/stack_trace_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698