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

Unified Diff: chrome/browser/extensions/extension_event_router.h

Issue 10804020: Introduce runtime.onSuspendCanceled() event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/extensions/extension_event_router.h
diff --git a/chrome/browser/extensions/extension_event_router.h b/chrome/browser/extensions/extension_event_router.h
index 834d85f258453277ab1d21e5f8df52ca26279398..eaa4a6e1a716597a4a6d8a716ec33963de6e59af 100644
--- a/chrome/browser/extensions/extension_event_router.h
+++ b/chrome/browser/extensions/extension_event_router.h
@@ -214,6 +214,18 @@ class ExtensionEventRouter : public content::NotificationObserver,
content::RenderProcessHost* process,
const linked_ptr<ExtensionEvent>& event);
+ // Dispatch "onSuspendCanceled" to a particular extension.
+ void DispatchOnSuspendCanceled(
+ content::RenderProcessHost* process, const std::string& extension_id);
+
+ // Returns true if the given extension is in the process of unloading. More
+ // specifically, this will return true in the phase where the onSuspend event
+ // has been fired, but before the extension's background page has been
+ // unloaded. During this period other events that arrive for the extension
+ // cause the unload process to be canceled and an onSuspendCanceled event to
+ // be sent.
+ bool IsClosing(Profile* profile, const extensions::Extension* extension);
benwells 2012/07/19 04:01:21 Could we rename this to MightBeClosing, MaybeClosi
koz (OOO until 15th September) 2012/07/19 06:52:11 Hm, I don't think IsClosing() is such a bad name.
+
// Returns false when the event is scoped to a profile and the listening
// extension does not have access to events from that profile. Also fills
// |event_args| with the proper arguments to send, which may differ if

Powered by Google App Engine
This is Rietveld 408576698