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

Side by Side Diff: android_webview/native/aw_message_port_service_impl.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 24 matching lines...) Expand all
35 // AwMessagePortService implementation 35 // AwMessagePortService implementation
36 void OnConvertedWebToAppMessage( 36 void OnConvertedWebToAppMessage(
37 int message_port_id, 37 int message_port_id,
38 const base::ListValue& message, 38 const base::ListValue& message,
39 const std::vector<int>& sent_message_port_ids) override; 39 const std::vector<int>& sent_message_port_ids) override;
40 void OnMessagePortMessageFilterClosing( 40 void OnMessagePortMessageFilterClosing(
41 AwMessagePortMessageFilter* filter) override; 41 AwMessagePortMessageFilter* filter) override;
42 void CleanupPort(int message_port_id) override; 42 void CleanupPort(int message_port_id) override;
43 43
44 // Methods called from Java. 44 // Methods called from Java.
45 void PostAppToWebMessage(JNIEnv* env, jobject object, int sender_id, 45 void PostAppToWebMessage(
46 jstring message, jintArray sent_ports); 46 JNIEnv* env,
47 void ClosePort(JNIEnv* env, jobject object, int message_port_id); 47 const base::android::JavaParamRef<jobject>& object,
48 void ReleaseMessages(JNIEnv* env, jobject object, int message_port_id); 48 int sender_id,
49 const base::android::JavaParamRef<jstring>& message,
50 const base::android::JavaParamRef<jintArray>& sent_ports);
51 void ClosePort(JNIEnv* env,
52 const base::android::JavaParamRef<jobject>& object,
53 int message_port_id);
54 void ReleaseMessages(JNIEnv* env,
55 const base::android::JavaParamRef<jobject>& object,
56 int message_port_id);
49 57
50 void RemoveSentPorts(const std::vector<int>& sent_ports); 58 void RemoveSentPorts(const std::vector<int>& sent_ports);
51 59
52 private: 60 private:
53 void PostAppToWebMessageOnIOThread( 61 void PostAppToWebMessageOnIOThread(
54 int sender_id, 62 int sender_id,
55 base::string16* message, 63 base::string16* message,
56 std::vector<int>* sent_ports); 64 std::vector<int>* sent_ports);
57 void CreateMessageChannelOnIOThread( 65 void CreateMessageChannelOnIOThread(
58 scoped_refptr<AwMessagePortMessageFilter> filter, 66 scoped_refptr<AwMessagePortMessageFilter> filter,
(...skipping 11 matching lines...) Expand all
70 MessagePorts ports_; // Access on IO thread 78 MessagePorts ports_; // Access on IO thread
71 79
72 DISALLOW_COPY_AND_ASSIGN(AwMessagePortServiceImpl); 80 DISALLOW_COPY_AND_ASSIGN(AwMessagePortServiceImpl);
73 }; 81 };
74 82
75 bool RegisterAwMessagePortService(JNIEnv* env); 83 bool RegisterAwMessagePortService(JNIEnv* env);
76 84
77 } // namespace android_webview 85 } // namespace android_webview
78 86
79 #endif // ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_ 87 #endif // ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « android_webview/native/aw_http_auth_handler.cc ('k') | android_webview/native/aw_message_port_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698