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

Unified Diff: content/public/browser/service_worker_context.h

Issue 2166523003: Add ref count to service workers for extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: send increment/decrement request from renderer/ process Created 4 years, 3 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: content/public/browser/service_worker_context.h
diff --git a/content/public/browser/service_worker_context.h b/content/public/browser/service_worker_context.h
index 47f355c734ae46b1a5e17b04968f898a526901c0..0b75115364db74589c254561f40a7fdb3ec6c259 100644
--- a/content/public/browser/service_worker_context.h
+++ b/content/public/browser/service_worker_context.h
@@ -18,6 +18,8 @@ enum class WebNavigationHintType;
namespace content {
+class StoragePartition;
michaeln 2016/09/24 01:46:51 no longer needed?
lazyboy 2016/09/27 21:26:45 Done.
+
// Represents the per-StoragePartition ServiceWorker data.
class ServiceWorkerContext {
public:
@@ -60,6 +62,9 @@ class ServiceWorkerContext {
const GURL& script_url,
const ResultCallback& callback) = 0;
+ virtual bool IncrementPendingActivity(int64_t service_worker_version_id) = 0;
+ virtual bool DecrementPendingActivity(int64_t service_worker_version_id) = 0;
+
// Equivalent to calling navigator.serviceWorker.unregister(pattern) from a
// renderer, except that |pattern| is an absolute URL instead of relative to
// some current origin. |callback| is passed true when the JS promise is

Powered by Google App Engine
This is Rietveld 408576698