| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/linked_ptr.h" | |
| 14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/scoped_vector.h" | |
| 16 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 17 #include "ipc/ipc_listener.h" | 15 #include "ipc/ipc_listener.h" |
| 18 #include "ipc/ipc_sender.h" | 16 #include "ipc/ipc_sender.h" |
| 19 #include "ppapi/c/pp_instance.h" | 17 #include "ppapi/c/pp_instance.h" |
| 20 #include "ppapi/c/pp_resource.h" | 18 #include "ppapi/c/pp_resource.h" |
| 21 #include "ppapi/host/ppapi_host_export.h" | 19 #include "ppapi/host/ppapi_host_export.h" |
| 22 #include "ppapi/shared_impl/ppapi_permissions.h" | 20 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 23 | 21 |
| 24 namespace ppapi { | 22 namespace ppapi { |
| 25 | 23 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 116 |
| 119 // Non-owning pointer. | 117 // Non-owning pointer. |
| 120 IPC::Sender* sender_; | 118 IPC::Sender* sender_; |
| 121 | 119 |
| 122 PpapiPermissions permissions_; | 120 PpapiPermissions permissions_; |
| 123 | 121 |
| 124 // Filters for resource creation messages. Note that since we don't support | 122 // Filters for resource creation messages. Note that since we don't support |
| 125 // deleting these dynamically we don't need to worry about modifications | 123 // deleting these dynamically we don't need to worry about modifications |
| 126 // during iteration. If we add that capability, this should be replaced with | 124 // during iteration. If we add that capability, this should be replaced with |
| 127 // an base::ObserverList. | 125 // an base::ObserverList. |
| 128 ScopedVector<HostFactory> host_factory_filters_; | 126 std::vector<scoped_ptr<HostFactory>> host_factory_filters_; |
| 129 | 127 |
| 130 // Filters for instance messages. Note that since we don't support deleting | 128 // Filters for instance messages. Note that since we don't support deleting |
| 131 // these dynamically we don't need to worry about modifications during | 129 // these dynamically we don't need to worry about modifications during |
| 132 // iteration. If we add that capability, this should be replaced with an | 130 // iteration. If we add that capability, this should be replaced with an |
| 133 // base::ObserverList. | 131 // base::ObserverList. |
| 134 ScopedVector<InstanceMessageFilter> instance_message_filters_; | 132 std::vector<scoped_ptr<InstanceMessageFilter>> instance_message_filters_; |
| 135 | 133 |
| 136 typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; | 134 typedef std::map<PP_Resource, scoped_ptr<ResourceHost>> ResourceMap; |
| 137 ResourceMap resources_; | 135 ResourceMap resources_; |
| 138 | 136 |
| 139 // Resources that have been created in the host and have not yet had the | 137 // Resources that have been created in the host and have not yet had the |
| 140 // corresponding PluginResource associated with them. | 138 // corresponding PluginResource associated with them. |
| 141 // See PpapiHostMsg_AttachToPendingHost. | 139 // See PpapiHostMsg_AttachToPendingHost. |
| 142 typedef std::map<int, linked_ptr<ResourceHost> > PendingHostResourceMap; | 140 typedef std::map<int, scoped_ptr<ResourceHost>> PendingHostResourceMap; |
| 143 PendingHostResourceMap pending_resource_hosts_; | 141 PendingHostResourceMap pending_resource_hosts_; |
| 144 int next_pending_resource_host_id_; | 142 int next_pending_resource_host_id_; |
| 145 | 143 |
| 146 DISALLOW_COPY_AND_ASSIGN(PpapiHost); | 144 DISALLOW_COPY_AND_ASSIGN(PpapiHost); |
| 147 }; | 145 }; |
| 148 | 146 |
| 149 } // namespace host | 147 } // namespace host |
| 150 } // namespace ppapi | 148 } // namespace ppapi |
| 151 | 149 |
| 152 #endif // PPAPI_HOST_PPAPIE_HOST_H_ | 150 #endif // PPAPI_HOST_PPAPIE_HOST_H_ |
| OLD | NEW |