summaryrefslogtreecommitdiffstats
path: root/chrome/browser/background_mode_manager.h
diff options
context:
space:
mode:
authordimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 00:19:58 +0000
committerdimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 00:19:58 +0000
commit653c71c9f764951ce33e1aecd5fc614ec26989ee (patch)
tree04fd724974b2ca0abbb58134446a1442c51029ee /chrome/browser/background_mode_manager.h
parentb258a28d04f488a8985159702ceed3c1b9913d3b (diff)
downloadchromium_src-653c71c9f764951ce33e1aecd5fc614ec26989ee.zip
chromium_src-653c71c9f764951ce33e1aecd5fc614ec26989ee.tar.gz
chromium_src-653c71c9f764951ce33e1aecd5fc614ec26989ee.tar.bz2
Re-land. Fixed previous build error.
Implement OSX version for "Start on Login" for background-enabled extensions. When user installs first background-enabled extension we set Chrome to be a hidden "Login Item", and when user uninstalls the last one, we remove Chrome from the "Login Items List". Login Items are the apps that are listed in Systempreferences->Accounts->Login Items, or which have a "Open on Login" check for their Dock icon. Since we manipulate the user-faced UI item here, we try to do it in a way that will likely not interfere with user settings. Most typically, users do not use 'hidden' property, so if we ever encounter setting w/o this property, we won't override. Also there is a hidden preference used to remember the fact that Chrome changed the settings earlier - to avoid override on uninstall of the last persistent app in opposite case. Using the same bit that user can manipulate separately and perhaps even knows about is beneficial since it provides for unified place to "start Chrome on Login" and reduces confusion. Implementation for Login Items List access uses LSSharedFileList API that is available starting 10.5, which I think is our minimal supported version of OSX. BUG=43382 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57569 Reverted, trying to re-land. Review URL: http://codereview.chromium.org/3163029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background_mode_manager.h')
-rw-r--r--chrome/browser/background_mode_manager.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/background_mode_manager.h b/chrome/browser/background_mode_manager.h
index 3a82399..38b010c 100644
--- a/chrome/browser/background_mode_manager.h
+++ b/chrome/browser/background_mode_manager.h
@@ -82,6 +82,12 @@ class BackgroundModeManager
// Returns true if the background mode preference is enabled
bool IsBackgroundModeEnabled();
+ // Returns true if chrome has set "launch on startup" property for itself
+ // earlier and is allowed to reset it later, reducing likelihood of
+ // overriding user choices.
+ bool IsLaunchOnStartupResetAllowed();
+ void SetLaunchOnStartupResetAllowed(bool allowed);
+
// Called to make sure that our launch-on-startup mode is properly set.
// (virtual so we can override for tests).
virtual void EnableLaunchOnStartup(bool should_launch);