Chromium Code Reviews| Index: chrome/browser/background/background_mode_manager.h |
| diff --git a/chrome/browser/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h |
| index 0494f5a2abde2d94d568fa040e1ab993c5ea767d..ad4a4286f430a5cbec5801e16bab39a3edc04149 100644 |
| --- a/chrome/browser/background/background_mode_manager.h |
| +++ b/chrome/browser/background/background_mode_manager.h |
| @@ -13,6 +13,7 @@ |
| #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| #include "chrome/browser/status_icons/status_icon.h" |
| #include "chrome/browser/status_icons/status_icon_menu_model.h" |
| +#include "chrome/browser/ui/browser_list_observer.h" |
| #include "components/browser_context_keyed_service/browser_context_keyed_service.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| @@ -45,6 +46,7 @@ class Extension; |
| // background. |
| class BackgroundModeManager |
| : public content::NotificationObserver, |
| + public chrome::BrowserListObserver, |
| public BackgroundApplicationListModel::Observer, |
| public ProfileInfoCacheObserver, |
| public StatusIconMenuModel::Delegate { |
| @@ -63,6 +65,17 @@ class BackgroundModeManager |
| // Returns true if background mode is active. |
| virtual bool IsBackgroundModeActive(); |
| + // Suspends background mode until either ResumeBackgroundMode is called or |
| + // Chrome is restarted. This has the same effect as ending background mode |
| + // until for the current browser session. |
|
benwells
2013/10/20 23:46:22
Nit: until for what?
Sam McNally
2013/10/21 04:31:03
Done.
|
| + virtual void SuspendBackgroundMode(); |
| + |
| + // Resumes background mode. This ends a suspension of background mode, but |
| + // will not start it if it is not enabled. |
| + virtual void ResumeBackgroundMode(); |
| + |
| + virtual void OnBrowserAdded(Browser* browser) OVERRIDE; |
|
benwells
2013/10/20 23:46:22
Nit: Make private, and add comment for what interf
Sam McNally
2013/10/21 04:31:03
Done.
|
| + |
| // For testing purposes. |
| int NumberOfBackgroundModeData(); |
| @@ -302,6 +315,9 @@ class BackgroundModeManager |
| // app). |
| bool keep_alive_for_test_; |
| + // Set to true when background mode is suspended. |
| + bool background_mode_suspended_; |
| + |
| // Provides a command id for each profile as they are created. |
| int current_command_id_; |