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

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

Issue 10804020: Introduce runtime.onSuspendCanceled() event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delete dead code 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.cc
diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc
index 89df410adebcb0fe29bad3c8df95d869da556085..ec1af019b23eb7ca65aa5da95800770777bce9cc 100644
--- a/chrome/browser/extensions/extension_event_router.cc
+++ b/chrome/browser/extensions/extension_event_router.cc
@@ -436,6 +436,8 @@ void ExtensionEventRouter::DispatchEventToProcess(
return;
}
+ CancelSuspend(listener_profile, extension);
koz (OOO until 15th September) 2012/07/19 06:52:12 mpcomplete@: I'm assuming that this is the only pl
Matt Perry 2012/07/19 21:36:22 It depends on what we want to cancel a suspend. Ju
koz (OOO until 15th September) 2012/07/20 06:08:09 My reading of ExtensionMessageService indicates th
Matt Perry 2012/07/20 18:04:17 After thinking about it some more, I think it make
+
DispatchEvent(process, extension_id,
event->event_name, *event_args,
event->event_url, event->user_gesture,
@@ -443,6 +445,15 @@ void ExtensionEventRouter::DispatchEventToProcess(
IncrementInFlightEvents(listener_profile, extension);
}
+void ExtensionEventRouter::CancelSuspend(Profile* profile,
+ const Extension* extension) {
+ if (extension->has_lazy_background_page()) {
+ ExtensionProcessManager* pm =
+ extensions::ExtensionSystem::Get(profile)->process_manager();
+ pm->CancelSuspend(extension);
+ }
+}
+
bool ExtensionEventRouter::CanDispatchEventToProfile(
Profile* profile,
const Extension* extension,

Powered by Google App Engine
This is Rietveld 408576698