Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1299)

Unified Diff: chrome/browser/background_mode_manager.h

Issue 6954001: Add "Keep chrome running in background" preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed formatting nits Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/background_mode_manager.h
diff --git a/chrome/browser/background_mode_manager.h b/chrome/browser/background_mode_manager.h
index 236637f62e5d369750a36f57fc3c5593fb6cd2c2..171f463620dab607c99169bd0d3a20191d42fa1b 100644
--- a/chrome/browser/background_mode_manager.h
+++ b/chrome/browser/background_mode_manager.h
@@ -46,7 +46,6 @@ class BackgroundModeManager
BackgroundModeManager(Profile* profile, CommandLine* command_line);
virtual ~BackgroundModeManager();
- static bool IsBackgroundModeEnabled(const CommandLine* command_line);
static void RegisterPrefs(PrefService* prefs);
private:
@@ -146,7 +145,23 @@ class BackgroundModeManager
// window.
Browser* GetBrowserWindow();
+ // Returns true if the "Let chrome run in the background" pref is checked.
+ bool IsBackgroundModePrefEnabled();
+
+ // Turns off background mode if it's currently enabled.
+ void DisableBackgroundMode();
+
+ // Turns on background mode if it's currently disabled.
+ void EnableBackgroundMode();
+
+ // Returns true if background mode is permanently disabled for this chrome
+ // session.
+ static bool IsBackgroundModePermanentlyDisabled(
+ const CommandLine* command_line);
+
+ // Registrars for managing our change observers.
NotificationRegistrar registrar_;
+ PrefChangeRegistrar pref_registrar_;
// The parent profile for this object.
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698