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

Unified Diff: android_webview/native/aw_picture.cc

Issue 1492703004: Pass method parameters as JavaParamRef in android_webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot to test compile unit tests before uploading, whoops Created 5 years 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 | « android_webview/native/aw_picture.h ('k') | android_webview/native/aw_quota_manager_bridge_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_picture.cc
diff --git a/android_webview/native/aw_picture.cc b/android_webview/native/aw_picture.cc
index a46be2caf534ed745f02698bb1c60a67c50c7133..6c98d3db582ff78ccb237a64af059405dd1ad050 100644
--- a/android_webview/native/aw_picture.cc
+++ b/android_webview/native/aw_picture.cc
@@ -18,19 +18,21 @@ AwPicture::AwPicture(skia::RefPtr<SkPicture> picture)
AwPicture::~AwPicture() {}
-void AwPicture::Destroy(JNIEnv* env, jobject obj) {
+void AwPicture::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) {
delete this;
}
-jint AwPicture::GetWidth(JNIEnv* env, jobject obj) {
+jint AwPicture::GetWidth(JNIEnv* env, const JavaParamRef<jobject>& obj) {
return picture_->cullRect().roundOut().width();
}
-jint AwPicture::GetHeight(JNIEnv* env, jobject obj) {
+jint AwPicture::GetHeight(JNIEnv* env, const JavaParamRef<jobject>& obj) {
return picture_->cullRect().roundOut().height();
}
-void AwPicture::Draw(JNIEnv* env, jobject obj, jobject canvas) {
+void AwPicture::Draw(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ const JavaParamRef<jobject>& canvas) {
const SkIRect bounds = picture_->cullRect().roundOut();
scoped_ptr<SoftwareCanvasHolder> canvas_holder = SoftwareCanvasHolder::Create(
canvas, gfx::Vector2d(), gfx::Size(bounds.width(), bounds.height()),
« no previous file with comments | « android_webview/native/aw_picture.h ('k') | android_webview/native/aw_quota_manager_bridge_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698