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

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

Issue 7578001: Unify var tracking between webkit and the proxy. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy_test.cc ('k') | ppapi/proxy/proxy_object_var.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
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_PROXY_OBJECT_VAR_H_
6 #define PPAPI_PROXY_PROXY_OBJECT_VAR_H_
7
8 #include "base/compiler_specific.h"
9 #include "ppapi/shared_impl/var.h"
10
11 namespace pp {
12 namespace proxy {
13 class PluginDispatcher;
14 } // namespace proxy
15 } // namespace pp
16
17 namespace ppapi {
18
19 // Tracks a reference to an object var in the plugin side of the proxy. This
20 // just stores the dispatcher and host var ID, and provides the interface for
21 // integrating this with PP_Var creation.
22 class ProxyObjectVar : public Var {
23 public:
24 ProxyObjectVar(pp::proxy::PluginDispatcher* dispatcher,
25 int32 host_var_id);
26
27 virtual ~ProxyObjectVar();
28
29 // Var overrides.
30 virtual ProxyObjectVar* AsProxyObjectVar() OVERRIDE;
31 virtual PP_Var GetPPVar() OVERRIDE;
32 virtual PP_VarType GetType() const OVERRIDE;
33
34 pp::proxy::PluginDispatcher* dispatcher() const { return dispatcher_; }
35 int32 host_var_id() const { return host_var_id_; }
36
37 // Expose AssignVarID on Var so the PluginResourceTracker can call us when
38 // it's creating IDs.
39 void AssignVarID(int32 id);
40
41 private:
42 pp::proxy::PluginDispatcher* dispatcher_;
43 int32 host_var_id_;
44
45 DISALLOW_COPY_AND_ASSIGN(ProxyObjectVar);
46 };
47
48 } // namespace ppapi
49
50 #endif // PPAPI_PROXY_PROXY_OBJECT_VAR_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy_test.cc ('k') | ppapi/proxy/proxy_object_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698