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

Issue 8509019: Add JavaBoundObject (Closed)

Created:
9 years, 1 month ago by Steve Block
Modified:
9 years, 1 month ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, dpranke-watch+content_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Add JavaBoundObject This represents a Java object for use in the Java bridge. It handles all of the JNI required to interrogate the Java object and call methods on it. Also adds some JNI utility methods to simpify the new code. BUG=96703 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109645

Patch Set 1 #

Patch Set 2 : Removed a superfluous string::reserve() #

Total comments: 5

Patch Set 3 : Moved new files to java/ #

Total comments: 11

Patch Set 4 : Fixed nits #

Total comments: 30

Patch Set 5 : Fixed style #

Total comments: 11

Patch Set 6 : Fixed style #

Patch Set 7 : Use mutable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1042 lines, -3 lines) Patch
M base/android/jni_android.h View 1 2 3 4 5 2 chunks +23 lines, -2 lines 0 comments Download
M base/android/jni_android.cc View 1 2 3 4 5 4 chunks +17 lines, -1 line 0 comments Download
A content/browser/renderer_host/java/java_bound_object.h View 1 2 3 4 5 6 1 chunk +60 lines, -0 lines 0 comments Download
A content/browser/renderer_host/java/java_bound_object.cc View 1 2 3 4 5 6 1 chunk +614 lines, -0 lines 0 comments Download
A content/browser/renderer_host/java/java_method.h View 1 2 3 4 5 6 1 chunk +62 lines, -0 lines 0 comments Download
A content/browser/renderer_host/java/java_method.cc View 1 2 3 4 5 6 1 chunk +258 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Steve Block
9 years, 1 month ago (2011-11-09 19:13:29 UTC) #1
Steve Block
Ready for review
9 years, 1 month ago (2011-11-10 12:46:14 UTC) #2
jam
can we move all the java files under browser/renderer_host to browser/renderer_host/java? http://codereview.chromium.org/8509019/diff/3001/content/browser/renderer_host/java_bound_object.cc File content/browser/renderer_host/java_bound_object.cc (right): ...
9 years, 1 month ago (2011-11-10 17:30:20 UTC) #3
Steve Block
> can we move all the java files under browser/renderer_host > to browser/renderer_host/java? Sure. Is ...
9 years, 1 month ago (2011-11-10 18:17:55 UTC) #4
jam
On 2011/11/10 18:17:55, Steve Block wrote: > > can we move all the java files ...
9 years, 1 month ago (2011-11-10 18:26:07 UTC) #5
Steve Block
Moving all Java Bridge code to new java/ directory in http://codereview.chromium.org/8525016
9 years, 1 month ago (2011-11-11 01:24:55 UTC) #6
Steve Block
Will rebase onto http://codereview.chromium.org/8525016 before landing
9 years, 1 month ago (2011-11-11 02:46:14 UTC) #7
jam
lgtm from owner, but i don't know any of this java code, so someone familiar ...
9 years, 1 month ago (2011-11-11 03:07:29 UTC) #8
Steve Block
Thanks John. Ben, Joth and Marcus, you guys reviewed reviewed this code locally before I ...
9 years, 1 month ago (2011-11-11 09:59:05 UTC) #9
joth
a few (more) small nits.... but basically looks fine to me :) http://codereview.chromium.org/8509019/diff/10001/base/android/jni_android.cc File base/android/jni_android.cc ...
9 years, 1 month ago (2011-11-11 11:40:37 UTC) #10
Steve Block
http://codereview.chromium.org/8509019/diff/10001/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/8509019/diff/10001/base/android/jni_android.cc#newcode55 base/android/jni_android.cc:55: return GetMethodID(env, clazz.obj(), method, jni_signature); On 2011/11/11 11:40:38, joth ...
9 years, 1 month ago (2011-11-11 12:22:53 UTC) #11
Steve Block
+ maruel for base/ approval
9 years, 1 month ago (2011-11-11 12:27:55 UTC) #12
M-A Ruel
http://codereview.chromium.org/8509019/diff/12003/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/8509019/diff/12003/base/android/jni_android.cc#newcode80 base/android/jni_android.cc:80: const char* const field, const char* field, making the ...
9 years, 1 month ago (2011-11-11 13:31:13 UTC) #13
Steve Block
http://codereview.chromium.org/8509019/diff/12003/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/8509019/diff/12003/base/android/jni_android.cc#newcode80 base/android/jni_android.cc:80: const char* const field, On 2011/11/11 13:31:13, Marc-Antoine Ruel ...
9 years, 1 month ago (2011-11-11 16:05:20 UTC) #14
M-A Ruel
Only the const_cast<> bothers me, the rest is optional. http://codereview.chromium.org/8509019/diff/14003/base/android/jni_android.h File base/android/jni_android.h (right): http://codereview.chromium.org/8509019/diff/14003/base/android/jni_android.h#newcode61 base/android/jni_android.h:61: ...
9 years, 1 month ago (2011-11-11 16:22:28 UTC) #15
Steve Block
http://codereview.chromium.org/8509019/diff/14003/base/android/jni_android.h File base/android/jni_android.h (right): http://codereview.chromium.org/8509019/diff/14003/base/android/jni_android.h#newcode61 base/android/jni_android.h:61: // returns 0 if the field is not found. ...
9 years, 1 month ago (2011-11-11 16:31:33 UTC) #16
M-A Ruel
lgtm http://codereview.chromium.org/8509019/diff/14003/base/android/jni_android.h File base/android/jni_android.h (right): http://codereview.chromium.org/8509019/diff/14003/base/android/jni_android.h#newcode61 base/android/jni_android.h:61: // returns 0 if the field is not ...
9 years, 1 month ago (2011-11-11 16:43:29 UTC) #17
Steve Block
9 years, 1 month ago (2011-11-11 17:05:43 UTC) #18
http://codereview.chromium.org/8509019/diff/14003/content/browser/renderer_ho...
File content/browser/renderer_host/java/java_method.cc (right):

http://codereview.chromium.org/8509019/diff/14003/content/browser/renderer_ho...
content/browser/renderer_host/java/java_method.cc:171:
const_cast<JavaMethod*>(this)->EnsureNumParametersIsSetUp();
The reason I preferred the const_cast to using mutable was that it made clear
where the members need to be modified. But I guess you're right about false
advertising. Changed

Powered by Google App Engine
This is Rietveld 408576698