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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void OnHostMsgResourceDestroyed(PP_Resource resource); | 116 void OnHostMsgResourceDestroyed(PP_Resource resource); |
117 | 117 |
118 // Non-owning pointer. | 118 // Non-owning pointer. |
119 IPC::Sender* sender_; | 119 IPC::Sender* sender_; |
120 | 120 |
121 PpapiPermissions permissions_; | 121 PpapiPermissions permissions_; |
122 | 122 |
123 // Filters for resource creation messages. Note that since we don't support | 123 // Filters for resource creation messages. Note that since we don't support |
124 // deleting these dynamically we don't need to worry about modifications | 124 // deleting these dynamically we don't need to worry about modifications |
125 // during iteration. If we add that capability, this should be replaced with | 125 // during iteration. If we add that capability, this should be replaced with |
126 // an ObserverList. | 126 // an base::ObserverList. |
127 ScopedVector<HostFactory> host_factory_filters_; | 127 ScopedVector<HostFactory> host_factory_filters_; |
128 | 128 |
129 // Filters for instance messages. Note that since we don't support deleting | 129 // Filters for instance messages. Note that since we don't support deleting |
130 // these dynamically we don't need to worry about modifications during | 130 // these dynamically we don't need to worry about modifications during |
131 // iteration. If we add that capability, this should be replaced with an | 131 // iteration. If we add that capability, this should be replaced with an |
132 // ObserverList. | 132 // base::ObserverList. |
133 ScopedVector<InstanceMessageFilter> instance_message_filters_; | 133 ScopedVector<InstanceMessageFilter> instance_message_filters_; |
134 | 134 |
135 typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; | 135 typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; |
136 ResourceMap resources_; | 136 ResourceMap resources_; |
137 | 137 |
138 // Resources that have been created in the host and have not yet had the | 138 // Resources that have been created in the host and have not yet had the |
139 // corresponding PluginResource associated with them. | 139 // corresponding PluginResource associated with them. |
140 // See PpapiHostMsg_AttachToPendingHost. | 140 // See PpapiHostMsg_AttachToPendingHost. |
141 typedef std::map<int, linked_ptr<ResourceHost> > PendingHostResourceMap; | 141 typedef std::map<int, linked_ptr<ResourceHost> > PendingHostResourceMap; |
142 PendingHostResourceMap pending_resource_hosts_; | 142 PendingHostResourceMap pending_resource_hosts_; |
143 int next_pending_resource_host_id_; | 143 int next_pending_resource_host_id_; |
144 | 144 |
145 DISALLOW_COPY_AND_ASSIGN(PpapiHost); | 145 DISALLOW_COPY_AND_ASSIGN(PpapiHost); |
146 }; | 146 }; |
147 | 147 |
148 } // namespace host | 148 } // namespace host |
149 } // namespace ppapi | 149 } // namespace ppapi |
150 | 150 |
151 #endif // PPAPI_HOST_PPAPIE_HOST_H_ | 151 #endif // PPAPI_HOST_PPAPIE_HOST_H_ |
OLD | NEW |