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

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

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_H_
6 #define PPAPI_PROXY_PLUGIN_RESOURCE_H_
7
8 #include "base/basictypes.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/proxy/plugin_dispatcher.h"
11 #include "ppapi/proxy/plugin_resource_tracker.h"
12 #include "ppapi/shared_impl/host_resource.h"
13 #include "ppapi/shared_impl/resource_object_base.h"
14
15 namespace pp {
16 namespace proxy {
17
18 class PluginResource : public ::ppapi::ResourceObjectBase {
19 public:
20 PluginResource(const ppapi::HostResource& resource);
21 virtual ~PluginResource();
22
23 PP_Instance instance() const { return host_resource_.instance(); }
24
25 // Returns the host resource ID for sending to the host process.
26 const ppapi::HostResource& host_resource() const {
27 return host_resource_;
28 }
29
30 PluginDispatcher* GetDispatcher();
31
32 private:
33 // The resource ID in the host that this object corresponds to. Inside the
34 // plugin we'll remap the resource IDs so we can have many host processes
35 // each independently generating resources (which may conflict) but the IDs
36 // in the plugin will all be unique.
37 ppapi::HostResource host_resource_;
38
39 DISALLOW_COPY_AND_ASSIGN(PluginResource);
40 };
41
42 } // namespace proxy
43 } // namespace pp
44
45 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698