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

Unified Diff: chrome/browser/background/background_contents_service.h

Issue 10298002: No longer start BG mode until a BackgroundContents is loaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prospective fix for cros test failures. Created 8 years, 8 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/background_contents_service.h
diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h
index 10b7677bf1929d496c77136a8ebb9e5113f8c398..7232cce9baae84913b5cf7552b7f20fd9ba22c4a 100644
--- a/chrome/browser/background/background_contents_service.h
+++ b/chrome/browser/background/background_contents_service.h
@@ -53,6 +53,12 @@ class BackgroundContentsService : private content::NotificationObserver,
// or NULL if none.
BackgroundContents* GetAppBackgroundContents(const string16& appid);
+ // Returns true if there's a registered BackgroundContents for this app. It
+ // is possible for this routine to return true when GetAppBackgroundContents()
+ // returns false, if the BackgroundContents closed due to the render process
+ // crashing.
+ bool HasRegisteredBackgroundContents(const string16& appid);
+
// Returns all currently opened BackgroundContents (used by the task manager).
std::vector<BackgroundContents*> GetBackgroundContents() const;
@@ -152,6 +158,11 @@ class BackgroundContentsService : private content::NotificationObserver,
// Returns true if this BackgroundContents is in the contents_list_.
bool IsTracked(BackgroundContents* contents) const;
+ // Sends out a notification when our association of background contents with
+ // apps may have changed (used by BackgroundApplicationListModel to update the
+ // set of background apps as new background contents are opened/closed).
+ void SendChangeNotification(Profile* profile);
+
// PrefService used to store list of background pages (or NULL if this is
// running under an incognito profile).
PrefService* prefs_;

Powered by Google App Engine
This is Rietveld 408576698