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

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

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 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/android/content_readback_handler.h" 5 #include "content/browser/android/content_readback_handler.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "cc/output/copy_output_request.h" 9 #include "cc/output/copy_output_request.h"
10 #include "cc/output/copy_output_result.h" 10 #include "cc/output/copy_output_result.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 JNIEnv* env = base::android::AttachCurrentThread(); 108 JNIEnv* env = base::android::AttachCurrentThread();
109 ScopedJavaLocalRef<jobject> java_bitmap; 109 ScopedJavaLocalRef<jobject> java_bitmap;
110 if (response == READBACK_SUCCESS) 110 if (response == READBACK_SUCCESS)
111 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); 111 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
112 112
113 Java_ContentReadbackHandler_notifyGetBitmapFinished( 113 Java_ContentReadbackHandler_notifyGetBitmapFinished(
114 env, java_obj_.obj(), readback_id, java_bitmap.obj(), response); 114 env, java_obj_.obj(), readback_id, java_bitmap.obj(), response);
115 } 115 }
116 116
117 // static 117 // static
118 static jlong Init(JNIEnv* env, jobject obj) { 118 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
119 ContentReadbackHandler* content_readback_handler = 119 ContentReadbackHandler* content_readback_handler =
120 new ContentReadbackHandler(env, obj); 120 new ContentReadbackHandler(env, obj);
121 return reinterpret_cast<intptr_t>(content_readback_handler); 121 return reinterpret_cast<intptr_t>(content_readback_handler);
122 } 122 }
123 123
124 } // namespace content 124 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/child_process_launcher_android.cc ('k') | content/browser/android/content_video_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698