OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/mojo/service_registry_android.h" | 5 #include "content/common/mojo/service_registry_android.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "content/common/mojo/service_registry_impl.h" | 12 #include "content/common/mojo/service_registry_impl.h" |
13 #include "jni/ServiceRegistry_jni.h" | 13 #include "jni/ServiceRegistry_jni.h" |
14 | 14 |
15 using base::android::AttachCurrentThread; | 15 using base::android::AttachCurrentThread; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 JNIEnv* env, | 93 JNIEnv* env, |
94 const JavaParamRef<jobject>& j_service_registry, | 94 const JavaParamRef<jobject>& j_service_registry, |
95 const JavaParamRef<jstring>& j_name, | 95 const JavaParamRef<jstring>& j_name, |
96 jint j_handle) { | 96 jint j_handle) { |
97 std::string name(ConvertJavaStringToUTF8(env, j_name)); | 97 std::string name(ConvertJavaStringToUTF8(env, j_name)); |
98 mojo::ScopedMessagePipeHandle handle((mojo::MessagePipeHandle(j_handle))); | 98 mojo::ScopedMessagePipeHandle handle((mojo::MessagePipeHandle(j_handle))); |
99 service_registry_->ConnectToRemoteService(name, std::move(handle)); | 99 service_registry_->ConnectToRemoteService(name, std::move(handle)); |
100 } | 100 } |
101 | 101 |
102 } // namespace content | 102 } // namespace content |
OLD | NEW |