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

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

Issue 986553004: Hold messages in message port service when a message port is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address hush nit Created 5 years, 9 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 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 27 matching lines...) Expand all
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(JNIEnv* env, jobject object, int sender_id,
46 jstring message, jintArray sent_ports); 46 jstring message, jintArray sent_ports);
47 void ClosePort(JNIEnv* env, jobject object, int message_port_id); 47 void ClosePort(JNIEnv* env, jobject object, int message_port_id);
48 void ReleaseMessages(JNIEnv* env, jobject object, int message_port_id);
48 49
49 void RemoveSentPorts(const std::vector<int>& sent_ports); 50 void RemoveSentPorts(const std::vector<int>& sent_ports);
50 51
51 private: 52 private:
52 void PostAppToWebMessageOnIOThread( 53 void PostAppToWebMessageOnIOThread(
53 int sender_id, 54 int sender_id,
54 base::string16* message, 55 base::string16* message,
55 std::vector<int>* sent_ports); 56 std::vector<int>* sent_ports);
56 void CreateMessageChannelOnIOThread( 57 void CreateMessageChannelOnIOThread(
57 scoped_refptr<AwMessagePortMessageFilter> filter, 58 scoped_refptr<AwMessagePortMessageFilter> filter,
(...skipping 11 matching lines...) Expand all
69 MessagePorts ports_; // Access on IO thread 70 MessagePorts ports_; // Access on IO thread
70 71
71 DISALLOW_COPY_AND_ASSIGN(AwMessagePortServiceImpl); 72 DISALLOW_COPY_AND_ASSIGN(AwMessagePortServiceImpl);
72 }; 73 };
73 74
74 bool RegisterAwMessagePortService(JNIEnv* env); 75 bool RegisterAwMessagePortService(JNIEnv* env);
75 76
76 } // namespace android_webview 77 } // namespace android_webview
77 78
78 #endif // ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_ 79 #endif // ANDROID_WEBVIEW_NATIVE_AW_MESSAGE_PORT_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698