| 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_SHARED_IMPL_PPAPI_GLOBALS_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ |
| 6 #define PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ | 6 #define PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 virtual std::string GetCmdLine() = 0; | 121 virtual std::string GetCmdLine() = 0; |
| 122 | 122 |
| 123 // Preloads the font on Windows, does nothing on other platforms. | 123 // Preloads the font on Windows, does nothing on other platforms. |
| 124 // TODO(brettw) remove this by passing the instance into the API so we don't | 124 // TODO(brettw) remove this by passing the instance into the API so we don't |
| 125 // have to have it on the globals. | 125 // have to have it on the globals. |
| 126 virtual void PreCacheFontForFlash(const void* logfontw) = 0; | 126 virtual void PreCacheFontForFlash(const void* logfontw) = 0; |
| 127 | 127 |
| 128 virtual bool IsHostGlobals() const; | 128 virtual bool IsHostGlobals() const; |
| 129 virtual bool IsPluginGlobals() const; | 129 virtual bool IsPluginGlobals() const; |
| 130 | 130 |
| 131 // Records that the plugin is active. The plugin reports that it is active to | |
| 132 // containers that monitor and shutdown idle content such as background apps. | |
| 133 // This method only has an effect on the plugin process, calls from the | |
| 134 // renderer process will have no effect. | |
| 135 virtual void MarkPluginIsActive(); | |
| 136 | |
| 137 private: | 131 private: |
| 138 // Return the thread-local pointer which is used only for unit testing. It | 132 // Return the thread-local pointer which is used only for unit testing. It |
| 139 // should always be NULL when running in production. It allows separate | 133 // should always be NULL when running in production. It allows separate |
| 140 // threads to have distinct "globals". | 134 // threads to have distinct "globals". |
| 141 static PpapiGlobals* GetThreadLocalPointer(); | 135 static PpapiGlobals* GetThreadLocalPointer(); |
| 142 | 136 |
| 143 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 137 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 144 | 138 |
| 145 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals); | 139 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals); |
| 146 }; | 140 }; |
| 147 | 141 |
| 148 } // namespace ppapi | 142 } // namespace ppapi |
| 149 | 143 |
| 150 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ | 144 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ |
| OLD | NEW |