Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: ppapi/host/ppapi_host.h

Issue 1649623002: Update ppapi to not use linked_ptr or ScopedVector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark RawVarDataGraph as DISALLOW_COPY_AND_ASSIGN Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ppapi/host/ppapi_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | ppapi/host/ppapi_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698