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

Side by Side Diff: mojo/android/system/watcher_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
« no previous file with comments | « mojo/android/system/base_run_loop.cc ('k') | net/android/http_auth_negotiate_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/android/system/watcher_impl.h" 5 #include "mojo/android/system/watcher_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/android/base_jni_registrar.h" 10 #include "base/android/base_jni_registrar.h"
(...skipping 14 matching lines...) Expand all
25 namespace { 25 namespace {
26 26
27 class JavaWatcherCallback { 27 class JavaWatcherCallback {
28 public: 28 public:
29 JavaWatcherCallback(JNIEnv* env, const JavaParamRef<jobject>& java_watcher) { 29 JavaWatcherCallback(JNIEnv* env, const JavaParamRef<jobject>& java_watcher) {
30 java_watcher_.Reset(env, java_watcher); 30 java_watcher_.Reset(env, java_watcher);
31 } 31 }
32 32
33 void OnHandleReady(MojoResult result) { 33 void OnHandleReady(MojoResult result) {
34 Java_WatcherImpl_onHandleReady(base::android::AttachCurrentThread(), 34 Java_WatcherImpl_onHandleReady(base::android::AttachCurrentThread(),
35 java_watcher_.obj(), result); 35 java_watcher_, result);
36 } 36 }
37 37
38 private: 38 private:
39 base::android::ScopedJavaGlobalRef<jobject> java_watcher_; 39 base::android::ScopedJavaGlobalRef<jobject> java_watcher_;
40 }; 40 };
41 41
42 } // namespace 42 } // namespace
43 43
44 static jlong CreateWatcher(JNIEnv* env, const JavaParamRef<jobject>& jcaller) { 44 static jlong CreateWatcher(JNIEnv* env, const JavaParamRef<jobject>& jcaller) {
45 return reinterpret_cast<jlong>(new Watcher); 45 return reinterpret_cast<jlong>(new Watcher);
(...skipping 23 matching lines...) Expand all
69 jlong watcher_ptr) { 69 jlong watcher_ptr) {
70 delete reinterpret_cast<Watcher*>(watcher_ptr); 70 delete reinterpret_cast<Watcher*>(watcher_ptr);
71 } 71 }
72 72
73 bool RegisterWatcherImpl(JNIEnv* env) { 73 bool RegisterWatcherImpl(JNIEnv* env) {
74 return RegisterNativesImpl(env); 74 return RegisterNativesImpl(env);
75 } 75 }
76 76
77 } // namespace android 77 } // namespace android
78 } // namespace mojo 78 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/android/system/base_run_loop.cc ('k') | net/android/http_auth_negotiate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698