OLD | NEW |
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 WEBKIT_PLUGINS_PPAPI_HOST_GLOBALS_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_HOST_GLOBALS_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_HOST_GLOBALS_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_HOST_GLOBALS_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ppapi/shared_impl/ppapi_globals.h" | 9 #include "ppapi/shared_impl/ppapi_globals.h" |
10 #include "ppapi/shared_impl/var_tracker.h" | 10 #include "ppapi/shared_impl/var_tracker.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // Getter for the global singleton. Generally, you should use | 25 // Getter for the global singleton. Generally, you should use |
26 // PpapiGlobals::Get() when possible. Use this only when you need some | 26 // PpapiGlobals::Get() when possible. Use this only when you need some |
27 // host-specific functionality. | 27 // host-specific functionality. |
28 inline static HostGlobals* Get() { return host_globals_; } | 28 inline static HostGlobals* Get() { return host_globals_; } |
29 | 29 |
30 // PpapiGlobals implementation. | 30 // PpapiGlobals implementation. |
31 virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; | 31 virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; |
32 virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE; | 32 virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE; |
33 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI( | 33 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI( |
34 PP_Instance inst, | 34 PP_Instance inst, |
35 ::ppapi::proxy::InterfaceID id) OVERRIDE; | 35 ::ppapi::ApiID id) OVERRIDE; |
36 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; | 36 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; |
37 | 37 |
38 HostResourceTracker* host_resource_tracker() { | 38 HostResourceTracker* host_resource_tracker() { |
39 return &host_resource_tracker_; | 39 return &host_resource_tracker_; |
40 } | 40 } |
41 HostVarTracker* host_var_tracker() { | 41 HostVarTracker* host_var_tracker() { |
42 return &host_var_tracker_; | 42 return &host_var_tracker_; |
43 } | 43 } |
44 | 44 |
45 // PP_Modules ---------------------------------------------------------------- | 45 // PP_Modules ---------------------------------------------------------------- |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 typedef std::map<PP_Module, PluginModule*> ModuleMap; | 91 typedef std::map<PP_Module, PluginModule*> ModuleMap; |
92 ModuleMap module_map_; | 92 ModuleMap module_map_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(HostGlobals); | 94 DISALLOW_COPY_AND_ASSIGN(HostGlobals); |
95 }; | 95 }; |
96 | 96 |
97 } // namespace ppapi | 97 } // namespace ppapi |
98 } // namespace webkit | 98 } // namespace webkit |
99 | 99 |
100 #endif // WEBKIT_PLUGINS_PPAPI_HOST_GLOBALS_H_ | 100 #endif // WEBKIT_PLUGINS_PPAPI_HOST_GLOBALS_H_ |
OLD | NEW |