summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 20:55:45 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 20:55:45 +0000
commit4c793f0298cbafa6826ef1bc2d85d92bf64320ba (patch)
tree5e6e6a34051417ee4c6847f397713c5d56e99d0d /chrome/common
parent0906270c4485c74cf35fed76aee21458702ce68c (diff)
downloadchromium_src-4c793f0298cbafa6826ef1bc2d85d92bf64320ba.zip
chromium_src-4c793f0298cbafa6826ef1bc2d85d92bf64320ba.tar.gz
chromium_src-4c793f0298cbafa6826ef1bc2d85d92bf64320ba.tar.bz2
Added BackgroundModeManager which tracks when background apps are loaded/unloaded
and puts Chrome into BackgroundMode appropriately. Added EXTENSION_UNINSTALLING notification which is sent out when a notification is about to be uninstalled. Refactored StatusTray code to move StatusTray under the profile rather than attaching it to the browser process, and removed StatusTrayManager which is no longer needed now that BackgroundModeManager handles creating status icons. BUG=43382 TEST=background_mode_manager_unittests.cc Review URL: http://codereview.chromium.org/3134011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/notification_type.h7
-rw-r--r--chrome/common/pref_names.cc4
-rw-r--r--chrome/common/pref_names.h2
5 files changed, 18 insertions, 0 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 605e740..5dfeb0c 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -122,6 +122,10 @@ const char kDisableAudio[] = "disable-audio";
const char kDisableAuthNegotiateCnameLookup[] =
"disable-auth-negotiate-cname-lookup";
+// Disable background mode (background apps will not keep chrome running in the
+// background) - used when running tests involving background apps.
+const char kDisableBackgroundMode[] = "disable-background-mode";
+
// Disable limits on the number of backing stores. Can prevent blinking for
// users with many windows/tabs and lots of memory.
const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index bf1b4b7..770f6d9 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -49,6 +49,7 @@ extern const char kDisableApplicationCache[];
extern const char kDisableApps[];
extern const char kDisableAudio[];
extern const char kDisableAuthNegotiateCnameLookup[];
+extern const char kDisableBackgroundMode[];
extern const char kDisableBackingStoreLimit[];
extern const char kDisableByteRangeSupport[];
extern const char kDisableContentPrefetch[];
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index 48871b4..252f70d 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -787,6 +787,13 @@ class NotificationType {
// details about why the install failed.
EXTENSION_INSTALL_ERROR,
+ // Sent when a new extension is being uninstalled. When this notification
+ // is sent, the ExtensionsService still is tracking this extension (it has
+ // not been unloaded yet). This will be followed by an EXTENSION_UNLOADED
+ // or EXTENSION_UNLOADED_DISABLED when the extension is actually unloaded.
+ // The details are an Extension and the source is a Profile.
+ EXTENSION_UNINSTALLED,
+
// Sent when an extension is unloaded. This happens when an extension is
// uninstalled or disabled. The details are an Extension, and the source is
// a Profile.
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 40183d1..02f92424 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -687,6 +687,10 @@ const char kPreferencesWindowPlacement[] = "preferences.window_placement";
// renderer's in-memory cache of objects.
const char kMemoryCacheSize[] = "renderer.memory_cache.size";
+// Boolean that records if chrome should run in background mode when background
+// apps are installed.
+const char kBackgroundModeEnabled[] = "background_mode.enabled";
+
// String which specifies where to download files to by default.
const char kDownloadDefaultDirectory[] = "download.default_directory";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index f27005a..18503a0 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -250,6 +250,8 @@ extern const char kKeywordEditorWindowPlacement[];
extern const char kPreferencesWindowPlacement[];
extern const char kMemoryCacheSize[];
+extern const char kBackgroundModeEnabled[];
+
extern const char kDownloadDefaultDirectory[];
extern const char kDownloadExtensionsToOpen[];
extern const char kDownloadDirUpgraded[];