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

Unified Diff: ui/android/view_android.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/resources/resource_manager_impl.cc ('k') | ui/android/window_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_android.cc
diff --git a/ui/android/view_android.cc b/ui/android/view_android.cc
index 259aed6e162c13910e1571d036dfa2cd585031de..d855dbd48da5de1b9a31bd875b3c1860eb32a003 100644
--- a/ui/android/view_android.cc
+++ b/ui/android/view_android.cc
@@ -52,9 +52,7 @@ ViewAndroid::ScopedAnchorView::~ScopedAnchorView() {
const ScopedJavaLocalRef<jobject> view = view_.get(env);
const ScopedJavaLocalRef<jobject> delegate = delegate_.get(env);
if (!view.is_null() && !delegate.is_null()) {
- Java_ViewAndroidDelegate_removeView(env,
- delegate.obj(),
- view.obj());
+ Java_ViewAndroidDelegate_removeView(env, delegate, view);
}
view_.reset();
}
@@ -110,9 +108,7 @@ ViewAndroid::ScopedAnchorView ViewAndroid::AcquireAnchorView() {
JNIEnv* env = base::android::AttachCurrentThread();
return ViewAndroid::ScopedAnchorView(
- env,
- Java_ViewAndroidDelegate_acquireView(env, delegate.obj()),
- delegate);
+ env, Java_ViewAndroidDelegate_acquireView(env, delegate), delegate);
}
void ViewAndroid::SetAnchorRect(const JavaRef<jobject>& anchor,
@@ -133,16 +129,9 @@ void ViewAndroid::SetAnchorRect(const JavaRef<jobject>& anchor,
float content_offset_y_pix = GetWindowAndroid()->content_offset().y();
int top_margin = std::round(content_offset_y_pix + bounds.y() * scale);
JNIEnv* env = base::android::AttachCurrentThread();
- Java_ViewAndroidDelegate_setViewPosition(env,
- delegate.obj(),
- anchor.obj(),
- bounds.x(),
- bounds.y(),
- bounds.width(),
- bounds.height(),
- scale,
- left_margin,
- top_margin);
+ Java_ViewAndroidDelegate_setViewPosition(
+ env, delegate, anchor, bounds.x(), bounds.y(), bounds.width(),
+ bounds.height(), scale, left_margin, top_margin);
}
void ViewAndroid::RemoveChild(ViewAndroid* child) {
@@ -184,10 +173,7 @@ void ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext,
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
- Java_ViewAndroidDelegate_startDragAndDrop(env,
- delegate.obj(),
- jtext.obj(),
- jimage.obj());
+ Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, jimage);
}
} // namespace ui
« no previous file with comments | « ui/android/resources/resource_manager_impl.cc ('k') | ui/android/window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698