| 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::Sender* sender) 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, |
| 55 const IPC::Message& nested_msg); | 55 const IPC::Message& nested_msg); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 void OnMsgReserveInstanceId(PP_Instance instance, bool* usable); | 58 void OnMsgReserveInstanceId(PP_Instance instance, bool* usable); |
| 59 void OnMsgResourceReply(const ResourceMessageReplyParams& reply_params, | 59 void OnMsgResourceReply(const ResourceMessageReplyParams& reply_params, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 74 | 74 |
| 75 // The IPC sender 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::Sender* sender_; | 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 |