| 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 PPAPI_HOST_PPAPI_HOST_H_ | 5 #ifndef PPAPI_HOST_PPAPI_HOST_H_ |
| 6 #define PPAPI_HOST_PPAPI_HOST_H_ | 6 #define PPAPI_HOST_PPAPI_HOST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Sender implementation. Forwards to the sender_. | 51 // Sender implementation. Forwards to the sender_. |
| 52 virtual bool Send(IPC::Message* msg) OVERRIDE; | 52 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 53 | 53 |
| 54 // Listener implementation. | 54 // Listener implementation. |
| 55 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 55 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 56 | 56 |
| 57 // Sends the given reply message to the plugin. | 57 // Sends the given reply message to the plugin. |
| 58 void SendReply(const ReplyMessageContext& context, | 58 void SendReply(const ReplyMessageContext& context, |
| 59 const IPC::Message& msg); | 59 const IPC::Message& msg); |
| 60 | 60 |
| 61 // Sends the given unsolicited reply message to the plugin. |
| 62 void SendUnsolicitedReply(PP_Resource resource, const IPC::Message& msg); |
| 63 |
| 61 // Adds the given host factory filter to the host. The PpapiHost will take | 64 // Adds the given host factory filter to the host. The PpapiHost will take |
| 62 // ownership of the pointer. | 65 // ownership of the pointer. |
| 63 void AddHostFactoryFilter(scoped_ptr<HostFactory> filter); | 66 void AddHostFactoryFilter(scoped_ptr<HostFactory> filter); |
| 64 | 67 |
| 65 // Adds the given message filter to the host. The PpapiHost will take | 68 // Adds the given message filter to the host. The PpapiHost will take |
| 66 // ownership of the pointer. | 69 // ownership of the pointer. |
| 67 void AddInstanceMessageFilter(scoped_ptr<InstanceMessageFilter> filter); | 70 void AddInstanceMessageFilter(scoped_ptr<InstanceMessageFilter> filter); |
| 68 | 71 |
| 69 private: | 72 private: |
| 70 friend class InstanceMessageFilter; | 73 friend class InstanceMessageFilter; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; | 112 typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; |
| 110 ResourceMap resources_; | 113 ResourceMap resources_; |
| 111 | 114 |
| 112 DISALLOW_COPY_AND_ASSIGN(PpapiHost); | 115 DISALLOW_COPY_AND_ASSIGN(PpapiHost); |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace host | 118 } // namespace host |
| 116 } // namespace ppapi | 119 } // namespace ppapi |
| 117 | 120 |
| 118 #endif // PPAPI_HOST_PPAPIE_HOST_H_ | 121 #endif // PPAPI_HOST_PPAPIE_HOST_H_ |
| OLD | NEW |