| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
| 6 #define PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 6 #define PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 namespace ppapi { | 24 namespace ppapi { |
| 25 namespace proxy { | 25 namespace proxy { |
| 26 | 26 |
| 27 class MessageLoopResource; | 27 class MessageLoopResource; |
| 28 class PluginProxyDelegate; | 28 class PluginProxyDelegate; |
| 29 | 29 |
| 30 class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals { | 30 class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals { |
| 31 public: | 31 public: |
| 32 PluginGlobals(); | 32 PluginGlobals(); |
| 33 PluginGlobals(PpapiGlobals::ForTest); | 33 PluginGlobals(PpapiGlobals::ForPerThreadTest); |
| 34 virtual ~PluginGlobals(); | 34 virtual ~PluginGlobals(); |
| 35 | 35 |
| 36 // Getter for the global singleton. Generally, you should use | 36 // Getter for the global singleton. Generally, you should use |
| 37 // PpapiGlobals::Get() when possible. Use this only when you need some | 37 // PpapiGlobals::Get() when possible. Use this only when you need some |
| 38 // plugin-specific functionality. | 38 // plugin-specific functionality. |
| 39 inline static PluginGlobals* Get() { | 39 inline static PluginGlobals* Get() { |
| 40 DCHECK(PpapiGlobals::Get()->IsPluginGlobals()); | 40 DCHECK(PpapiGlobals::Get()->IsPluginGlobals()); |
| 41 return static_cast<PluginGlobals*>(PpapiGlobals::Get()); | 41 return static_cast<PluginGlobals*>(PpapiGlobals::Get()); |
| 42 } | 42 } |
| 43 | 43 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 scoped_ptr<BrowserSender> browser_sender_; | 148 scoped_ptr<BrowserSender> browser_sender_; |
| 149 | 149 |
| 150 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); | 150 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace proxy | 153 } // namespace proxy |
| 154 } // namespace ppapi | 154 } // namespace ppapi |
| 155 | 155 |
| 156 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 156 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
| OLD | NEW |