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

Side by Side Diff: content/browser/android/interface_provider_android_impl.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/interface_provider_android_impl.h" 5 #include "content/browser/android/interface_provider_android_impl.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"
(...skipping 16 matching lines...) Expand all
27 shell::InterfaceProvider* remote_interfaces) { 27 shell::InterfaceProvider* remote_interfaces) {
28 return base::WrapUnique(new InterfaceProviderAndroidImpl(remote_interfaces)); 28 return base::WrapUnique(new InterfaceProviderAndroidImpl(remote_interfaces));
29 } 29 }
30 30
31 // static 31 // static
32 bool InterfaceProviderAndroidImpl::Register(JNIEnv* env) { 32 bool InterfaceProviderAndroidImpl::Register(JNIEnv* env) {
33 return RegisterNativesImpl(env); 33 return RegisterNativesImpl(env);
34 } 34 }
35 35
36 InterfaceProviderAndroidImpl::~InterfaceProviderAndroidImpl() { 36 InterfaceProviderAndroidImpl::~InterfaceProviderAndroidImpl() {
37 Java_InterfaceProvider_destroy(AttachCurrentThread(), obj_.obj()); 37 Java_InterfaceProvider_destroy(AttachCurrentThread(), obj_);
38 } 38 }
39 39
40 // Constructor and destructor call into Java. 40 // Constructor and destructor call into Java.
41 InterfaceProviderAndroidImpl::InterfaceProviderAndroidImpl( 41 InterfaceProviderAndroidImpl::InterfaceProviderAndroidImpl(
42 shell::InterfaceProvider* remote_interfaces) 42 shell::InterfaceProvider* remote_interfaces)
43 : remote_interfaces_(remote_interfaces) { 43 : remote_interfaces_(remote_interfaces) {
44 JNIEnv* env = AttachCurrentThread(); 44 JNIEnv* env = AttachCurrentThread();
45 obj_.Reset( 45 obj_.Reset(
46 env, 46 env,
47 Java_InterfaceProvider_create( 47 Java_InterfaceProvider_create(
(...skipping 10 matching lines...) Expand all
58 JNIEnv* env, 58 JNIEnv* env,
59 const JavaParamRef<jobject>& j_interface_provider, 59 const JavaParamRef<jobject>& j_interface_provider,
60 const JavaParamRef<jstring>& j_name, 60 const JavaParamRef<jstring>& j_name,
61 jint j_handle) { 61 jint j_handle) {
62 std::string name(ConvertJavaStringToUTF8(env, j_name)); 62 std::string name(ConvertJavaStringToUTF8(env, j_name));
63 mojo::ScopedMessagePipeHandle handle((mojo::MessagePipeHandle(j_handle))); 63 mojo::ScopedMessagePipeHandle handle((mojo::MessagePipeHandle(j_handle)));
64 remote_interfaces_->GetInterface(name, std::move(handle)); 64 remote_interfaces_->GetInterface(name, std::move(handle));
65 } 65 }
66 66
67 } // namespace content 67 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/date_time_chooser_android.cc ('k') | content/browser/android/interface_registry_android_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698