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

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: 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..02402d60bc4fd6310d9b2ced40f4f489d697a101 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);
@@ -50,7 +52,8 @@ private:
void PostAppToWebMessageOnIOThread(
int sender_id,
base::string16* message,
- std::vector<int>* sent_ports);
+ std::vector<int>* sent_ports,
+ bool close_port);
void CreateMessageChannelOnIOThread(
scoped_refptr<AwMessagePortMessageFilter> filter,
int* port1,

Powered by Google App Engine
This is Rietveld 408576698