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

Unified Diff: android_webview/native/aw_message_port_service_impl.h

Issue 956763002: Implement the close() API for Message ports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Nasko review Created 5 years, 10 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 3ab5b88f69edaac3f972d45336ee745705d12cd6..fcb83bea51541485b8d28bb7f8a4180a3c776497 100644
--- a/android_webview/native/aw_message_port_service_impl.h
+++ b/android_webview/native/aw_message_port_service_impl.h
@@ -39,10 +39,12 @@ class AwMessagePortServiceImpl : public AwMessagePortService {
const std::vector<int>& sent_message_port_ids) override;
void OnMessagePortMessageFilterClosing(
AwMessagePortMessageFilter* filter) override;
+ void CleanupPort(int message_port_id) override;
// Methods called from Java.
void PostAppToWebMessage(JNIEnv* env, jobject object, int sender_id,
jstring message, jintArray sent_ports);
+ void ClosePort(JNIEnv* env, jobject object, int message_port_id);
void RemoveSentPorts(const std::vector<int>& sent_ports);
@@ -60,6 +62,7 @@ private:
int* port1,
int* port2);
void AddPort(int message_port_id, AwMessagePortMessageFilter* filter);
+ void PostClosePortMessage(int message_port_id);
JavaObjectWeakGlobalRef java_ref_;
typedef std::map<int, AwMessagePortMessageFilter*> MessagePorts;

Powered by Google App Engine
This is Rietveld 408576698