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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Sender implementation. Forwards to the sender_. | 49 // Sender implementation. Forwards to the sender_. |
50 virtual bool Send(IPC::Message* msg) OVERRIDE; | 50 virtual bool Send(IPC::Message* msg) OVERRIDE; |
51 | 51 |
52 // Listener implementation. | 52 // Listener implementation. |
53 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 53 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
54 | 54 |
55 // Sends the given reply message to the plugin. | 55 // Sends the given reply message to the plugin. |
56 void SendReply(const proxy::ResourceMessageReplyParams& params, | 56 void SendReply(const proxy::ResourceMessageReplyParams& params, |
57 const IPC::Message& msg); | 57 const IPC::Message& msg); |
58 | 58 |
| 59 // Sends the given unsolicited reply message to the plugin. |
| 60 void SendUnsolicitedReply(PP_Resource resource, const IPC::Message& msg); |
| 61 |
59 // Adds the given host factory filter to the host. The PpapiHost will take | 62 // Adds the given host factory filter to the host. The PpapiHost will take |
60 // ownership of the pointer. | 63 // ownership of the pointer. |
61 void AddHostFactoryFilter(scoped_ptr<HostFactory> filter); | 64 void AddHostFactoryFilter(scoped_ptr<HostFactory> filter); |
62 | 65 |
63 // Adds the given message filter to the host. The PpapiHost will take | 66 // Adds the given message filter to the host. The PpapiHost will take |
64 // ownership of the pointer. | 67 // ownership of the pointer. |
65 void AddInstanceMessageFilter(scoped_ptr<InstanceMessageFilter> filter); | 68 void AddInstanceMessageFilter(scoped_ptr<InstanceMessageFilter> filter); |
66 | 69 |
67 private: | 70 private: |
68 friend class InstanceMessageFilter; | 71 friend class InstanceMessageFilter; |
(...skipping 29 matching lines...) Expand all Loading... |
98 typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; | 101 typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; |
99 ResourceMap resources_; | 102 ResourceMap resources_; |
100 | 103 |
101 DISALLOW_COPY_AND_ASSIGN(PpapiHost); | 104 DISALLOW_COPY_AND_ASSIGN(PpapiHost); |
102 }; | 105 }; |
103 | 106 |
104 } // namespace host | 107 } // namespace host |
105 } // namespace ppapi | 108 } // namespace ppapi |
106 | 109 |
107 #endif // PPAPI_HOST_PPAPIE_HOST_H_ | 110 #endif // PPAPI_HOST_PPAPIE_HOST_H_ |
OLD | NEW |