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

Unified Diff: android_webview/native/aw_message_port_service_impl.h

Issue 869133005: Post a Message from Java to JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address mnaganov comments Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_message_port_service_impl.h
diff --git a/android_webview/native/aw_message_port_service_impl.h b/android_webview/native/aw_message_port_service_impl.h
index d938b6eb0b05512ff19a0ee19688b97d3176fde8..757d75d11e00cf754b75fe80d70ee69e0c262bf6 100644
--- a/android_webview/native/aw_message_port_service_impl.h
+++ b/android_webview/native/aw_message_port_service_impl.h
@@ -33,14 +33,24 @@ class AwMessagePortServiceImpl : public AwMessagePortService {
scoped_refptr<AwMessagePortMessageFilter> filter);
// AwMessagePortService implementation
- void OnConvertedMessage(
+ void OnConvertedWebToAppMessage(
int message_port_id,
const base::ListValue& message,
const std::vector<int>& sent_message_port_ids) override;
void OnMessagePortMessageFilterClosing(
AwMessagePortMessageFilter* filter) override;
+ // Methods called from Java.
+ void PostAppToWebMessage(JNIEnv* env, jobject object, int sender_id,
+ jstring message, jintArray sent_ports);
+
+ void RemoveSentPorts(const std::vector<int>& sent_ports);
+
private:
+ void PostAppToWebMessageOnIOThread(
+ int sender_id,
+ base::string16* message,
+ std::vector<int>* sent_ports);
void CreateMessageChannelOnIOThread(
scoped_refptr<AwMessagePortMessageFilter> filter,
int* port1,

Powered by Google App Engine
This is Rietveld 408576698