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

Unified Diff: extensions/browser/event_router.h

Issue 2940883007: Move lazy event dispatching code out of EventRouter. (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_router.h
diff --git a/extensions/browser/event_router.h b/extensions/browser/event_router.h
index 8cc397ced1fe22895e19d5a55c15e0f6152eca27..cba1dc6c75d4232acab91e7a00402f977d1104fb 100644
--- a/extensions/browser/event_router.h
+++ b/extensions/browser/event_router.h
@@ -102,6 +102,14 @@ class EventRouter : public KeyedService,
UserGestureState user_gesture,
const EventFilteringInfo& info);
+ // Returns false when the event is scoped to a context and the listening
+ // extension does not have access to events from that context. Also fills
+ // |event_args| with the proper arguments to send, which may differ if
Devlin 2017/06/15 01:37:26 I realize this was copy-paste, but event_args don'
lazyboy 2017/06/15 04:39:22 Done.
+ // the event crosses the incognito boundary.
+ static bool CanDispatchEventToBrowserContext(content::BrowserContext* context,
+ const Extension* extension,
+ const Event& event);
+
// An EventRouter is shared between |browser_context| and its associated
// incognito context. |extension_prefs| may be NULL in tests.
EventRouter(content::BrowserContext* browser_context,
@@ -299,14 +307,6 @@ class EventRouter : public KeyedService,
const base::DictionaryValue* listener_filter,
bool did_enqueue);
- // Returns false when the event is scoped to a context and the listening
- // extension does not have access to events from that context. Also fills
- // |event_args| with the proper arguments to send, which may differ if
- // the event crosses the incognito boundary.
- bool CanDispatchEventToBrowserContext(content::BrowserContext* context,
- const Extension* extension,
- const linked_ptr<Event>& event);
-
// Possibly loads given extension's background page in preparation to
// dispatch an event. Returns true if the event was queued for subsequent
// dispatch, false otherwise.

Powered by Google App Engine
This is Rietveld 408576698