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

Unified Diff: extensions/browser/event_listener_map.h

Issue 2943583002: [extension SW] Support lazy events from extension service workers. (Closed)
Patch Set: Created 3 years, 6 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: extensions/browser/event_listener_map.h
diff --git a/extensions/browser/event_listener_map.h b/extensions/browser/event_listener_map.h
index ea25ea6b433561dbdd8d8e4954e6f9eb6368eb6a..ec3aee7e3c9ab6d8473db2317a2220b1ac03dad0 100644
--- a/extensions/browser/event_listener_map.h
+++ b/extensions/browser/event_listener_map.h
@@ -67,6 +67,7 @@ class EventListener {
const std::string& event_name,
const std::string& extension_id,
content::RenderProcessHost* process,
+ const GURL& service_worker_scope,
int worker_thread_id,
std::unique_ptr<base::DictionaryValue> filter);
@@ -83,6 +84,7 @@ class EventListener {
// Returns true if this listener was registered for an extension service
// worker.
bool IsForServiceWorker() const;
Devlin 2017/06/16 02:34:42 We probably shouldn't have two "IsForServiceWorker
lazyboy 2017/06/16 18:48:05 Aha, I kept the new one close to the one so I don'
+ bool is_for_service_worker() const { return is_for_service_worker_; }
// Modifies this listener to be a lazy listener, clearing process references.
void MakeLazy();
@@ -105,6 +107,7 @@ class EventListener {
const std::string& extension_id,
const GURL& listener_url,
content::RenderProcessHost* process,
+ bool is_for_service_worker,
int worker_thread_id,
std::unique_ptr<base::DictionaryValue> filter);
@@ -112,6 +115,7 @@ class EventListener {
const std::string extension_id_;
const GURL listener_url_;
content::RenderProcessHost* process_;
+ const bool is_for_service_worker_ = false;
Devlin 2017/06/16 02:34:42 Do we need this + worker_thread_id? If so, worth
lazyboy 2017/06/16 18:48:05 Yes we need both. is_for_service_worker implies th
const int worker_thread_id_;
std::unique_ptr<base::DictionaryValue> filter_;
EventFilter::MatcherID matcher_id_; // -1 if unset.

Powered by Google App Engine
This is Rietveld 408576698