diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-04 12:16:48 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-04 12:16:48 +0000 |
commit | 9530df2727e0f01e2b1205350f11f6b873ff77d4 (patch) | |
tree | a9048ac699ae1737a34b95aa0671c5479cde5917 /extensions/browser/process_manager.h | |
parent | b8770cd5fa7618d1b5d1e629de92e10f8beca668 (diff) | |
download | chromium_src-9530df2727e0f01e2b1205350f11f6b873ff77d4.zip chromium_src-9530df2727e0f01e2b1205350f11f6b873ff77d4.tar.gz chromium_src-9530df2727e0f01e2b1205350f11f6b873ff77d4.tar.bz2 |
Test Keeping NaCl plugins used in app background pages alive when active.
(Re-landing with fixes from https://codereview.chromium.org/111563006/ )
Activity in Native Client plugins results in IPC messages
sent to the BrowserPpapiHostImpl and routed to call
extensions::ProcessManager::KeepaliveImpulse.
Testing patch, builds on implementation:
https://codereview.chromium.org/61063003/
Design doc:
https://docs.google.com/a/chromium.org/document/d/1mI0lS1rfAf-BAGLmWAEcWy37Xq9dOvgfMx8OqeUMXts/edit#
BUG=298339
No change to mseaborn owned file since last LGTM:
TBR=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/112663007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/process_manager.h')
-rw-r--r-- | extensions/browser/process_manager.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h index 8b48aab..f283c79 100644 --- a/extensions/browser/process_manager.h +++ b/extensions/browser/process_manager.h @@ -121,6 +121,14 @@ class ProcessManager : public content::NotificationObserver { // related SiteInstances. content::BrowserContext* GetBrowserContext() const; + // Sets callbacks for testing keepalive impulse behavior. + typedef base::Callback<void(const std::string& extension_id)> + ImpulseCallbackForTesting; + void SetKeepaliveImpulseCallbackForTesting( + const ImpulseCallbackForTesting& callback); + void SetKeepaliveImpulseDecrementCallbackForTesting( + const ImpulseCallbackForTesting& callback); + protected: // If |context| is incognito pass the master context as |original_context|. // Otherwise pass the same context for both. @@ -216,6 +224,9 @@ class ProcessManager : public content::NotificationObserver { base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_; + ImpulseCallbackForTesting keepalive_impulse_callback_for_testing_; + ImpulseCallbackForTesting keepalive_impulse_decrement_callback_for_testing_; + base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(ProcessManager); |