OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ |
6 #define CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ | 6 #define CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 MessageQueueState plugin_message_queue_state_; | 179 MessageQueueState plugin_message_queue_state_; |
180 | 180 |
181 std::map<std::string, ppapi::ScopedPPVar> internal_named_properties_; | 181 std::map<std::string, ppapi::ScopedPPVar> internal_named_properties_; |
182 | 182 |
183 V8VarConverter var_converter_; | 183 V8VarConverter var_converter_; |
184 | 184 |
185 // A callback to invoke at shutdown to ensure we unregister ourselves as | 185 // A callback to invoke at shutdown to ensure we unregister ourselves as |
186 // Observers for sync messages. | 186 // Observers for sync messages. |
187 base::Closure unregister_observer_callback_; | 187 base::Closure unregister_observer_callback_; |
188 | 188 |
| 189 // This one is used only for var conversion result callbacks. In some cases, |
| 190 // we want to force pending conversions to happen synchronously and cancel |
| 191 // all pending callbacks. |
| 192 base::WeakPtrFactory<MessageChannel> var_conversion_weak_ptr_factory_; |
| 193 |
189 // This is used to ensure pending tasks will not fire after this object is | 194 // This is used to ensure pending tasks will not fire after this object is |
190 // destroyed. | 195 // destroyed. |
191 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_; | 196 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_; |
192 | 197 |
193 DISALLOW_COPY_AND_ASSIGN(MessageChannel); | 198 DISALLOW_COPY_AND_ASSIGN(MessageChannel); |
194 }; | 199 }; |
195 | 200 |
196 } // namespace content | 201 } // namespace content |
197 | 202 |
198 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ | 203 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ |
OLD | NEW |