Chromium Code Reviews| Index: ppapi/proxy/plugin_globals.h |
| diff --git a/ppapi/proxy/plugin_globals.h b/ppapi/proxy/plugin_globals.h |
| index bc55245d611a10c5dc154529a1749b595ef86134..834584f2edd58068ef76b8d8839dc81788d366a9 100644 |
| --- a/ppapi/proxy/plugin_globals.h |
| +++ b/ppapi/proxy/plugin_globals.h |
| @@ -73,6 +73,7 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals { |
| const std::string& value) OVERRIDE; |
| virtual MessageLoopShared* GetCurrentMessageLoop() OVERRIDE; |
| base::TaskRunner* GetFileTaskRunner() OVERRIDE; |
| + virtual void MarkPluginIsActive() OVERRIDE; |
| // Returns the channel for sending to the browser. |
| IPC::Sender* GetBrowserSender(); |
| @@ -128,6 +129,9 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals { |
| // The embedder should call this function when the command line is known. |
| void set_command_line(const std::string& c) { command_line_ = c; } |
| + bool plugin_has_been_active() const { return plugin_has_been_active_; } |
| + void set_plugin_has_been_active(bool b) { plugin_has_been_active_ = b; } |
| + |
| private: |
| class BrowserSender; |
| @@ -160,6 +164,11 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals { |
| // lazily, since it might not be needed. |
| scoped_ptr<base::Thread> file_thread_; |
| + // Indicates activity by the plugin. Used to monitor when a plugin can be |
| + // shutdown due to idleness. |
| + // TODO(scheib) Mark that this is OK to hit from any thread |
|
dmichael (off chromium)
2013/11/06 22:39:21
Virtually all the ppapi/proxy stuff is guarded by
scheib
2013/11/15 01:22:17
Done.
|
| + bool plugin_has_been_active_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PluginGlobals); |
| }; |