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/basictypes.h" | 10 #include "base/basictypes.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 // Record that plugin is active. Avoids being shutdown in containers that | |
dmichael (off chromium)
2013/11/15 18:26:22
nits:
"the" plugin
Avoids->Prevents
scheib
2013/12/11 21:35:40
Done.
| |
132 // detect idle content. | |
dmichael (off chromium)
2013/11/15 18:26:22
such as background apps?
scheib
2013/12/11 21:35:40
Done.
| |
133 // This method only has an effect on the plugin process, calls from the | |
134 // renderer process will have an effect. | |
dmichael (off chromium)
2013/11/15 18:26:22
an->no ?
scheib
2013/12/11 21:35:40
Done.
| |
135 virtual void MarkPluginIsActive(); | |
136 | |
131 private: | 137 private: |
132 // Return the thread-local pointer which is used only for unit testing. It | 138 // Return the thread-local pointer which is used only for unit testing. It |
133 // should always be NULL when running in production. It allows separate | 139 // should always be NULL when running in production. It allows separate |
134 // threads to have distinct "globals". | 140 // threads to have distinct "globals". |
135 static PpapiGlobals* GetThreadLocalPointer(); | 141 static PpapiGlobals* GetThreadLocalPointer(); |
136 | 142 |
137 scoped_refptr<base::MessageLoopProxy> main_loop_proxy_; | 143 scoped_refptr<base::MessageLoopProxy> main_loop_proxy_; |
138 | 144 |
139 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals); | 145 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals); |
140 }; | 146 }; |
141 | 147 |
142 } // namespace ppapi | 148 } // namespace ppapi |
143 | 149 |
144 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ | 150 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ |
OLD | NEW |