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

Side by Side Diff: ppapi/shared_impl/resource_tracker.h

Issue 7687005: Create ppapi_proxy.dll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/resource.h ('k') | ppapi/shared_impl/scoped_pp_resource.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SHARED_IMPL_RESOURCE_TRACKER_H_ 5 #ifndef PPAPI_SHARED_IMPL_RESOURCE_TRACKER_H_
6 #define PPAPI_SHARED_IMPL_RESOURCE_TRACKER_H_ 6 #define PPAPI_SHARED_IMPL_RESOURCE_TRACKER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_resource.h" 14 #include "ppapi/c/pp_resource.h"
15 #include "ppapi/shared_impl/ppapi_shared_export.h"
15 16
16 namespace ppapi { 17 namespace ppapi {
17 18
18 class Resource; 19 class Resource;
19 20
20 class ResourceTracker { 21 class PPAPI_SHARED_EXPORT ResourceTracker {
21 public: 22 public:
22 ResourceTracker(); 23 ResourceTracker();
23 virtual ~ResourceTracker(); 24 virtual ~ResourceTracker();
24 25
25 // The returned pointer will be NULL if there is no resource. The reference 26 // The returned pointer will be NULL if there is no resource. The reference
26 // count of the resource is unaffected. 27 // count of the resource is unaffected.
27 Resource* GetResource(PP_Resource res) const; 28 Resource* GetResource(PP_Resource res) const;
28 29
29 void AddRefResource(PP_Resource res); 30 void AddRefResource(PP_Resource res);
30 void ReleaseResource(PP_Resource res); 31 void ReleaseResource(PP_Resource res);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ResourceMap live_resources_; 90 ResourceMap live_resources_;
90 91
91 int32 last_resource_value_; 92 int32 last_resource_value_;
92 93
93 DISALLOW_COPY_AND_ASSIGN(ResourceTracker); 94 DISALLOW_COPY_AND_ASSIGN(ResourceTracker);
94 }; 95 };
95 96
96 } // namespace ppapi 97 } // namespace ppapi
97 98
98 #endif // PPAPI_SHARED_IMPL_RESOURCE_TRACKER_H_ 99 #endif // PPAPI_SHARED_IMPL_RESOURCE_TRACKER_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/resource.h ('k') | ppapi/shared_impl/scoped_pp_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698