OLD | NEW |
(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_SHARED_IMPL_PPAPI_GLOBALS_H_ |
| 6 #define PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "ppapi/shared_impl/ppapi_shared_export.h" |
| 10 |
| 11 namespace ppapi { |
| 12 |
| 13 class ResourceTracker; |
| 14 class VarTracker; |
| 15 |
| 16 // Abstract base class |
| 17 class PPAPI_SHARED_EXPORT PpapiGlobals { |
| 18 public: |
| 19 PpapiGlobals(); |
| 20 virtual ~PpapiGlobals(); |
| 21 |
| 22 // Getter for the global singleton. |
| 23 inline static PpapiGlobals* Get() { return ppapi_globals_; } |
| 24 |
| 25 virtual ResourceTracker* GetResourceTracker() = 0; |
| 26 virtual VarTracker* GetVarTracker() = 0; |
| 27 |
| 28 private: |
| 29 static PpapiGlobals* ppapi_globals_; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals); |
| 32 }; |
| 33 |
| 34 } // namespace ppapi |
| 35 |
| 36 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ |
OLD | NEW |