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

Unified Diff: android_webview/native/aw_message_port_service_impl.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_message_port_service_impl.h ('k') | android_webview/native/aw_pdf_exporter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_message_port_service_impl.cc
diff --git a/android_webview/native/aw_message_port_service_impl.cc b/android_webview/native/aw_message_port_service_impl.cc
index cbbe282973af48b0db7fd0b815a8663feeec2679..65f7bb034cc3cb6be21ef51ab20d716250a8b753 100644
--- a/android_webview/native/aw_message_port_service_impl.cc
+++ b/android_webview/native/aw_message_port_service_impl.cc
@@ -122,8 +122,12 @@ void AwMessagePortServiceImpl::OnMessagePortMessageFilterClosing(
}
}
-void AwMessagePortServiceImpl::PostAppToWebMessage(JNIEnv* env, jobject obj,
- int sender_id, jstring message, jintArray sent_ports) {
+void AwMessagePortServiceImpl::PostAppToWebMessage(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ int sender_id,
+ const JavaParamRef<jstring>& message,
+ const JavaParamRef<jintArray>& sent_ports) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::string16* j_message = new base::string16;
ConvertJavaStringToUTF16(env, message, j_message);
@@ -145,8 +149,9 @@ void AwMessagePortServiceImpl::PostAppToWebMessage(JNIEnv* env, jobject obj,
// it is possible that messages are still queued in the renderer process
// waiting for a conversion. Instead, it sends a special message with
// a flag which indicates that this message port should be closed.
-void AwMessagePortServiceImpl::ClosePort(JNIEnv* env, jobject obj,
- int message_port_id) {
+void AwMessagePortServiceImpl::ClosePort(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ int message_port_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
BrowserThread::PostTask(
BrowserThread::IO,
@@ -156,8 +161,9 @@ void AwMessagePortServiceImpl::ClosePort(JNIEnv* env, jobject obj,
message_port_id));
}
-void AwMessagePortServiceImpl::ReleaseMessages(JNIEnv* env, jobject obj,
- int message_port_id) {
+void AwMessagePortServiceImpl::ReleaseMessages(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ int message_port_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
BrowserThread::PostTask(
BrowserThread::IO,
« no previous file with comments | « android_webview/native/aw_message_port_service_impl.h ('k') | android_webview/native/aw_pdf_exporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698