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

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

Issue 8342016: Revert 106142 - Add a new globals object for PPAPI tracking information. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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/enter_proxy.h ('k') | ppapi/proxy/plugin_globals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_GLOBALS_H_
6 #define PPAPI_PROXY_PLUGIN_GLOBALS_H_
7
8 #include "base/compiler_specific.h"
9 #include "ppapi/proxy/plugin_resource_tracker.h"
10 #include "ppapi/proxy/plugin_var_tracker.h"
11 #include "ppapi/shared_impl/ppapi_globals.h"
12
13 namespace ppapi {
14 namespace proxy {
15
16 class PluginGlobals : public PpapiGlobals {
17 public:
18 PluginGlobals();
19 virtual ~PluginGlobals();
20
21 // Getter for the global singleton. Generally, you should use
22 // PpapiGlobals::Get() when possible. Use this only when you need some
23 // plugin-specific functionality.
24 inline static PluginGlobals* Get() { return plugin_globals_; }
25
26 // PpapiGlobals implementation.
27 virtual ResourceTracker* GetResourceTracker() OVERRIDE;
28 virtual VarTracker* GetVarTracker() OVERRIDE;
29
30 // Getters for the plugin-specific versions.
31 PluginResourceTracker* plugin_resource_tracker() {
32 return &plugin_resource_tracker_;
33 }
34 PluginVarTracker* plugin_var_tracker() {
35 return &plugin_var_tracker_;
36 }
37
38 private:
39 static PluginGlobals* plugin_globals_;
40
41 PluginResourceTracker plugin_resource_tracker_;
42 PluginVarTracker plugin_var_tracker_;
43
44 DISALLOW_COPY_AND_ASSIGN(PluginGlobals);
45 };
46
47 } // namespace proxy
48 } // namespace ppapi
49
50 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/enter_proxy.h ('k') | ppapi/proxy/plugin_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698