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

Unified Diff: extensions/browser/process_manager.h

Issue 689833005: Add a way to kill apps without killing windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win compile Created 6 years, 1 month 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
« no previous file with comments | « no previous file | extensions/browser/process_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager.h
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
index ba923d2480b1d0ad44a0b15c031809593b9f9c42..5dcc7f1cf607d79cac35d96428d1f20f0f7571a9 100644
--- a/extensions/browser/process_manager.h
+++ b/extensions/browser/process_manager.h
@@ -77,6 +77,16 @@ class ProcessManager : public KeyedService,
// apps, not hosted apps.
virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url);
+ // If the view isn't keeping the lazy background page alive, increments the
+ // keepalive count to do so.
+ void AcquireLazyKeepaliveCountForView(
+ content::RenderViewHost* render_view_host);
+
+ // If the view is keeping the lazy background page alive, decrements the
+ // keepalive count to stop doing it.
+ void ReleaseLazyKeepaliveCountForView(
+ content::RenderViewHost* render_view_host);
+
// Unregisters a RenderViewHost as hosting any extension.
void UnregisterRenderViewHost(content::RenderViewHost* render_view_host);
@@ -102,9 +112,6 @@ class ProcessManager : public KeyedService,
void IncrementLazyKeepaliveCount(const Extension* extension);
void DecrementLazyKeepaliveCount(const Extension* extension);
- void IncrementLazyKeepaliveCountForView(
- content::RenderViewHost* render_view_host);
-
// Keeps a background page alive. Unlike IncrementLazyKeepaliveCount, these
// impulses will only keep the page alive for a limited amount of time unless
// called regularly.
@@ -210,10 +217,11 @@ class ProcessManager : public KeyedService,
// Extra information we keep for each extension's background page.
struct BackgroundPageData;
+ struct ExtensionRenderViewData;
typedef std::string ExtensionId;
typedef std::map<ExtensionId, BackgroundPageData> BackgroundPageDataMap;
- typedef std::map<content::RenderViewHost*,
- extensions::ViewType> ExtensionRenderViews;
+ typedef std::map<content::RenderViewHost*, ExtensionRenderViewData>
+ ExtensionRenderViews;
// Load all background pages once the profile data is ready and the pages
// should be loaded.
« no previous file with comments | « no previous file | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698