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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 61 // Sends the given unsolicited reply message to the plugin. |
62 void SendUnsolicitedReply(PP_Resource resource, const IPC::Message& msg); | 62 void SendUnsolicitedReply(PP_Resource resource, const IPC::Message& msg); |
63 | 63 |
| 64 // Create a ResourceHost with the given |nested_msg|. |
| 65 scoped_ptr<ResourceHost> CreateResourceHost( |
| 66 const proxy::ResourceMessageCallParams& params, |
| 67 PP_Instance instance, |
| 68 const IPC::Message& nested_msg); |
| 69 |
64 // Adds the given host resource as a pending one (with no corresponding | 70 // Adds the given host resource as a pending one (with no corresponding |
65 // PluginResource object and no PP_Resource ID yet). The pending resource ID | 71 // PluginResource object and no PP_Resource ID yet). The pending resource ID |
66 // is returned. See PpapiHostMsg_AttachToPendingHost. | 72 // is returned. See PpapiHostMsg_AttachToPendingHost. |
67 int AddPendingResourceHost(scoped_ptr<ResourceHost> resource_host); | 73 int AddPendingResourceHost(scoped_ptr<ResourceHost> resource_host); |
68 | 74 |
69 // Adds the given host factory filter to the host. The PpapiHost will take | 75 // Adds the given host factory filter to the host. The PpapiHost will take |
70 // ownership of the pointer. | 76 // ownership of the pointer. |
71 void AddHostFactoryFilter(scoped_ptr<HostFactory> filter); | 77 void AddHostFactoryFilter(scoped_ptr<HostFactory> filter); |
72 | 78 |
73 // Adds the given message filter to the host. The PpapiHost will take | 79 // Adds the given message filter to the host. The PpapiHost will take |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 PendingHostResourceMap pending_resource_hosts_; | 131 PendingHostResourceMap pending_resource_hosts_; |
126 int next_pending_resource_host_id_; | 132 int next_pending_resource_host_id_; |
127 | 133 |
128 DISALLOW_COPY_AND_ASSIGN(PpapiHost); | 134 DISALLOW_COPY_AND_ASSIGN(PpapiHost); |
129 }; | 135 }; |
130 | 136 |
131 } // namespace host | 137 } // namespace host |
132 } // namespace ppapi | 138 } // namespace ppapi |
133 | 139 |
134 #endif // PPAPI_HOST_PPAPIE_HOST_H_ | 140 #endif // PPAPI_HOST_PPAPIE_HOST_H_ |
OLD | NEW |