summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-06 06:26:28 +0000
committertmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-06 06:26:28 +0000
commit8f959f52d735203ca0efc2776b094ceed33b754f (patch)
tree58ea66f19dd96b2790c3a273b503233b8252eb16 /apps
parent3687b2f8321ad2ddfc0dfbf51547fbdcc53491ad (diff)
downloadchromium_src-8f959f52d735203ca0efc2776b094ceed33b754f.zip
chromium_src-8f959f52d735203ca0efc2776b094ceed33b754f.tar.gz
chromium_src-8f959f52d735203ca0efc2776b094ceed33b754f.tar.bz2
Disable ephemeral apps after they stop running
Ephemeral apps are unloaded and disabled after they stop running to ensure that they have no background activity while they are cached. The event router, message service and message center no longer need special handling for idle ephemeral apps. BUG=339001,358052 TEST=browser_tests TBR=dewittj@chromium.org (for removal of code in message_center_settings_controller.cc) Review URL: https://codereview.chromium.org/344543006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/app_lifetime_monitor.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/app_lifetime_monitor.h b/apps/app_lifetime_monitor.h
index 9e4aa56..bc46e0e 100644
--- a/apps/app_lifetime_monitor.h
+++ b/apps/app_lifetime_monitor.h
@@ -31,19 +31,18 @@ class AppLifetimeMonitor : public KeyedService,
class Observer {
public:
// Called when the app starts running.
- virtual void OnAppStart(Profile* profile, const std::string& app_id) = 0;
+ virtual void OnAppStart(Profile* profile, const std::string& app_id) {}
// Called when the app becomes active to the user, i.e. it opens a window.
- virtual void OnAppActivated(Profile* profile,
- const std::string& app_id) = 0;
+ virtual void OnAppActivated(Profile* profile, const std::string& app_id) {}
// Called when the app becomes inactive to the user.
- virtual void OnAppDeactivated(Profile* profile,
- const std::string& app_id) = 0;
+ virtual void OnAppDeactivated(Profile* profile, const std::string& app_id) {
+ }
// Called when the app stops running.
- virtual void OnAppStop(Profile* profile, const std::string& app_id) = 0;
+ virtual void OnAppStop(Profile* profile, const std::string& app_id) {}
// Called when chrome is about to terminate. This gives observers a chance
// to do something before the apps shut down. This is a system-wide event
// so there is no associated profile and app id.
- virtual void OnChromeTerminating() = 0;
+ virtual void OnChromeTerminating() {}
protected:
virtual ~Observer() {}