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

Side by Side Diff: ppapi/proxy/plugin_resource_tracker.h

Issue 7105013: Convert more interfaces to the new thunk system. This goes up to and including (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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/proxy/interface_id.h ('k') | ppapi/proxy/plugin_resource_tracker.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) 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_PROXY_PLUGIN_RESOURCE_TRACKER_H_ 5 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_TRACKER_H_
6 #define PPAPI_PROXY_PLUGIN_RESOURCE_TRACKER_H_ 6 #define PPAPI_PROXY_PLUGIN_RESOURCE_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/compiler_specific.h"
11 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
12 #include "ppapi/c/pp_completion_callback.h" 13 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_stdint.h" 15 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_resource.h" 16 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_var.h" 17 #include "ppapi/c/pp_var.h"
17 #include "ppapi/proxy/host_resource.h" 18 #include "ppapi/proxy/host_resource.h"
18 #include "ppapi/shared_impl/tracker_base.h" 19 #include "ppapi/shared_impl/tracker_base.h"
19 20
20 template<typename T> struct DefaultSingletonTraits; 21 template<typename T> struct DefaultSingletonTraits;
(...skipping 28 matching lines...) Expand all
49 void AddRefResource(PP_Resource resource); 50 void AddRefResource(PP_Resource resource);
50 void ReleaseResource(PP_Resource resource); 51 void ReleaseResource(PP_Resource resource);
51 52
52 // Given a host resource, maps it to an existing plugin resource ID if it 53 // Given a host resource, maps it to an existing plugin resource ID if it
53 // exists, or returns 0 on failure. 54 // exists, or returns 0 on failure.
54 PP_Resource PluginResourceForHostResource( 55 PP_Resource PluginResourceForHostResource(
55 const HostResource& resource) const; 56 const HostResource& resource) const;
56 57
57 // TrackerBase. 58 // TrackerBase.
58 virtual ::ppapi::ResourceObjectBase* GetResourceAPI( 59 virtual ::ppapi::ResourceObjectBase* GetResourceAPI(
59 PP_Resource res); 60 PP_Resource res) OVERRIDE;
60 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI( 61 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI(
61 PP_Instance inst, 62 PP_Instance inst,
62 pp::proxy::InterfaceID id); 63 pp::proxy::InterfaceID id) OVERRIDE;
64 virtual PP_Instance GetInstanceForResource(PP_Resource resource) OVERRIDE;
63 65
64 private: 66 private:
65 friend struct DefaultSingletonTraits<PluginResourceTracker>; 67 friend struct DefaultSingletonTraits<PluginResourceTracker>;
66 friend class PluginResourceTrackerTest; 68 friend class PluginResourceTrackerTest;
67 friend class PluginProxyTest; 69 friend class PluginProxyTest;
68 70
69 PluginResourceTracker(); 71 PluginResourceTracker();
70 ~PluginResourceTracker(); 72 ~PluginResourceTracker();
71 73
72 struct ResourceInfo { 74 struct ResourceInfo {
(...skipping 23 matching lines...) Expand all
96 // duplicates. 98 // duplicates.
97 PP_Resource last_resource_id_; 99 PP_Resource last_resource_id_;
98 100
99 DISALLOW_COPY_AND_ASSIGN(PluginResourceTracker); 101 DISALLOW_COPY_AND_ASSIGN(PluginResourceTracker);
100 }; 102 };
101 103
102 } // namespace proxy 104 } // namespace proxy
103 } // namespace pp 105 } // namespace pp
104 106
105 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_TRACKER_H_ 107 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_TRACKER_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/interface_id.h ('k') | ppapi/proxy/plugin_resource_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698