diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 23:37:11 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 23:37:11 +0000 |
commit | 200c9187bd8029de9a6d4665082c7bf358c62829 (patch) | |
tree | 45f7ff4ffd5df2a88dc1b99ccbbed8dbb01fee18 /content/public/browser/browser_ppapi_host.h | |
parent | 617342a4d1d8c52a788b35a44f0f504d39b2f2cd (diff) | |
download | chromium_src-200c9187bd8029de9a6d4665082c7bf358c62829.zip chromium_src-200c9187bd8029de9a6d4665082c7bf358c62829.tar.gz chromium_src-200c9187bd8029de9a6d4665082c7bf358c62829.tar.bz2 |
Keep NaCl plugins used in app background pages alive when active.
Activity in Native Client plugins results in IPC messages
sent to the BrowserPpapiHostImpl and routed to call
extensions::ProcessManager::KeepaliveImpulse.
Implementation patch, to be followed by tests. See:
https://codereview.chromium.org/111563006/ Tests.
https://codereview.chromium.org/105873003/ Cumulative patch.
Design doc:
https://docs.google.com/a/chromium.org/document/d/1mI0lS1rfAf-BAGLmWAEcWy37Xq9dOvgfMx8OqeUMXts/edit#
BUG=298339
Review URL: https://codereview.chromium.org/61063003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser/browser_ppapi_host.h')
-rw-r--r-- | content/public/browser/browser_ppapi_host.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/content/public/browser/browser_ppapi_host.h b/content/public/browser/browser_ppapi_host.h index 45f997e..ce76d16 100644 --- a/content/public/browser/browser_ppapi_host.h +++ b/content/public/browser/browser_ppapi_host.h @@ -34,6 +34,17 @@ namespace content { // lives entirely on the I/O thread. class CONTENT_EXPORT BrowserPpapiHost { public: + struct OnKeepaliveInstanceStruct { + int render_process_id; + int render_view_id; + GURL document_url; + }; + typedef std::vector<OnKeepaliveInstanceStruct> OnKeepaliveInstanceData; + typedef base::Callback< + void (const OnKeepaliveInstanceData& instance_data, + const base::FilePath& profile_data_directory)> + OnKeepaliveCallback; + // Creates a browser host and sets up an out-of-process proxy for an external // pepper plugin process. static BrowserPpapiHost* CreateExternalPluginProcess( @@ -81,6 +92,10 @@ class CONTENT_EXPORT BrowserPpapiHost { // Get the Document/Plugin URLs for the given PP_Instance. virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0; virtual GURL GetPluginURLForInstance(PP_Instance instance) = 0; + + // Sets a callback the BrowserPpapiHost will run when the plugin messages + // that it is active. + virtual void SetOnKeepaliveCallback(const OnKeepaliveCallback& callback) = 0; }; } // namespace content |