OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_HOST_H_ |
6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // this set so that it doesn't get garbage collected while it's still | 107 // this set so that it doesn't get garbage collected while it's still |
108 // potentially in use. Although the set is managed native side, it's owned | 108 // potentially in use. Although the set is managed native side, it's owned |
109 // and defined in Java so that pushing refs into it does not create new GC | 109 // and defined in Java so that pushing refs into it does not create new GC |
110 // roots that would prevent ContentViewCore from being garbage collected. | 110 // roots that would prevent ContentViewCore from being garbage collected. |
111 JavaObjectWeakGlobalRef retained_object_set_; | 111 JavaObjectWeakGlobalRef retained_object_set_; |
112 bool allow_object_contents_inspection_; | 112 bool allow_object_contents_inspection_; |
113 GinJavaBoundObject::ObjectMap objects_; | 113 GinJavaBoundObject::ObjectMap objects_; |
114 typedef std::map<std::string, GinJavaBoundObject::ObjectID> NamedObjectMap; | 114 typedef std::map<std::string, GinJavaBoundObject::ObjectID> NamedObjectMap; |
115 NamedObjectMap named_objects_; | 115 NamedObjectMap named_objects_; |
116 | 116 |
| 117 // Keep track of pending calls out to Java such that we can send a synchronous |
| 118 // reply to the renderer waiting on the response should the RenderFrame be |
| 119 // destroyed while the reply is pending. |
| 120 // Only used on the UI thread. |
| 121 typedef std::map<RenderFrameHost*, IPC::Message*> PendingReplyMap; |
| 122 PendingReplyMap pending_replies_; |
| 123 |
117 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeDispatcherHost); | 124 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeDispatcherHost); |
118 }; | 125 }; |
119 | 126 |
120 } // namespace content | 127 } // namespace content |
121 | 128 |
122 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_HOST_H_ | 129 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_HOST_H_ |
OLD | NEW |