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" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // 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 |
35 // channel. | 35 // channel. |
36 // |thread_registrar| is used to look up handling threads for resource | 36 // |thread_registrar| is used to look up handling threads for resource |
37 // reply messages. It shouldn't be NULL. | 37 // reply messages. It shouldn't be NULL. |
38 PluginMessageFilter( | 38 PluginMessageFilter( |
39 std::set<PP_Instance>* seen_instance_ids, | 39 std::set<PP_Instance>* seen_instance_ids, |
40 scoped_refptr<ResourceReplyThreadRegistrar> thread_registrar); | 40 scoped_refptr<ResourceReplyThreadRegistrar> thread_registrar); |
41 virtual ~PluginMessageFilter(); | 41 virtual ~PluginMessageFilter(); |
42 | 42 |
43 // MessageFilter implementation. | 43 // MessageFilter implementation. |
44 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; | 44 virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE; |
45 virtual void OnFilterRemoved() OVERRIDE; | 45 virtual void OnFilterRemoved() OVERRIDE; |
46 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 46 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
47 | 47 |
48 // IPC::Sender implementation. | 48 // IPC::Sender implementation. |
49 virtual bool Send(IPC::Message* msg) OVERRIDE; | 49 virtual bool Send(IPC::Message* msg) OVERRIDE; |
50 | 50 |
51 // Simulates an incoming resource reply that is handled on the calling thread. | 51 // Simulates an incoming resource reply that is handled on the calling thread. |
52 // For testing only. | 52 // For testing only. |
53 static void DispatchResourceReplyForTest( | 53 static void DispatchResourceReplyForTest( |
54 const ResourceMessageReplyParams& reply_params, | 54 const ResourceMessageReplyParams& reply_params, |
(...skipping 10 matching lines...) Expand all Loading... |
65 const ResourceMessageReplyParams& reply_params, | 65 const ResourceMessageReplyParams& reply_params, |
66 const IPC::Message& nested_msg); | 66 const IPC::Message& nested_msg); |
67 | 67 |
68 // All instance IDs ever queried by any renderer on this plugin. This is used | 68 // All instance IDs ever queried by any renderer on this plugin. This is used |
69 // to make sure that new instance IDs are unique. This is a non-owning | 69 // to make sure that new instance IDs are unique. This is a non-owning |
70 // pointer. It is managed by PluginDispatcher::PluginDelegate. | 70 // pointer. It is managed by PluginDispatcher::PluginDelegate. |
71 std::set<PP_Instance>* seen_instance_ids_; | 71 std::set<PP_Instance>* seen_instance_ids_; |
72 | 72 |
73 scoped_refptr<ResourceReplyThreadRegistrar> resource_reply_thread_registrar_; | 73 scoped_refptr<ResourceReplyThreadRegistrar> resource_reply_thread_registrar_; |
74 | 74 |
75 // The IPC channel to the renderer. May be NULL if we're not currently | 75 // The IPC sender to the renderer. May be NULL if we're not currently |
76 // attached as a filter. | 76 // attached as a filter. |
77 IPC::Channel* channel_; | 77 IPC::Sender* sender_; |
78 }; | 78 }; |
79 | 79 |
80 } // namespace proxy | 80 } // namespace proxy |
81 } // namespace ppapi | 81 } // namespace ppapi |
82 | 82 |
83 #endif // PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ | 83 #endif // PPAPI_PROXY_PLUGIN_MESSAGE_FILTER_H_ |
OLD | NEW |