| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ | 
| 6 #define PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ | 6 #define PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ | 
| 7 | 7 | 
| 8 #include <set> | 8 #include <set> | 
| 9 | 9 | 
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" | 
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" | 
| 12 #include "ipc/ipc_channel_proxy.h" |  | 
| 13 #include "ipc/ipc_sender.h" | 12 #include "ipc/ipc_sender.h" | 
|  | 13 #include "ipc/message_filter.h" | 
| 14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" | 
| 15 #include "ppapi/proxy/ppapi_proxy_export.h" | 15 #include "ppapi/proxy/ppapi_proxy_export.h" | 
| 16 | 16 | 
| 17 namespace ppapi { | 17 namespace ppapi { | 
| 18 namespace proxy { | 18 namespace proxy { | 
| 19 | 19 | 
| 20 class ResourceMessageReplyParams; | 20 class ResourceMessageReplyParams; | 
| 21 class ResourceReplyThreadRegistrar; | 21 class ResourceReplyThreadRegistrar; | 
| 22 | 22 | 
| 23 // Listens for messages on the I/O thread of the plugin and handles some of | 23 // Listens for messages on the I/O thread of the plugin and handles some of | 
| 24 // them to avoid needing to block on the plugin. | 24 // them to avoid needing to block on the plugin. | 
| 25 // | 25 // | 
| 26 // There is one instance of this class for each renderer channel (same as for | 26 // There is one instance of this class for each renderer channel (same as for | 
| 27 // the PluginDispatchers). | 27 // the PluginDispatchers). | 
| 28 class PPAPI_PROXY_EXPORT PluginMessageFilter | 28 class PPAPI_PROXY_EXPORT PluginMessageFilter : public IPC::MessageFilter, | 
| 29     : public IPC::ChannelProxy::MessageFilter, | 29                                                public IPC::Sender { | 
| 30       public IPC::Sender { |  | 
| 31  public: | 30  public: | 
| 32   // |seen_instance_ids| is a pointer to a set that will be used to uniquify | 31   // |seen_instance_ids| is a pointer to a set that will be used to uniquify | 
| 33   // PP_Instances across all renderer channels. The same pointer should be | 32   // PP_Instances across all renderer channels. The same pointer should be | 
| 34   // passed to each MessageFilter to ensure uniqueness, and the value should | 33   // passed to each MessageFilter to ensure uniqueness, and the value should | 
| 35   // outlive this class. It could be NULL if this filter is for a browser | 34   // outlive this class. It could be NULL if this filter is for a browser | 
| 36   // channel. | 35   // channel. | 
| 37   // |thread_registrar| is used to look up handling threads for resource | 36   // |thread_registrar| is used to look up handling threads for resource | 
| 38   // reply messages. It shouldn't be NULL. | 37   // reply messages. It shouldn't be NULL. | 
| 39   PluginMessageFilter( | 38   PluginMessageFilter( | 
| 40       std::set<PP_Instance>* seen_instance_ids, | 39       std::set<PP_Instance>* seen_instance_ids, | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 75 | 74 | 
| 76   // The IPC channel to the renderer. May be NULL if we're not currently | 75   // The IPC channel to the renderer. May be NULL if we're not currently | 
| 77   // attached as a filter. | 76   // attached as a filter. | 
| 78   IPC::Channel* channel_; | 77   IPC::Channel* channel_; | 
| 79 }; | 78 }; | 
| 80 | 79 | 
| 81 }  // namespace proxy | 80 }  // namespace proxy | 
| 82 }  // namespace ppapi | 81 }  // namespace ppapi | 
| 83 | 82 | 
| 84 #endif  // PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ | 83 #endif  // PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ | 
| OLD | NEW | 
|---|