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

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

Issue 10837296: Fix a bug where the inspector would not keep event pages alive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yurys Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_process_manager.cc
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 27ffc2186a1aebd6de07b17580539b9020a826dd..7300b670b64bda6e1962a51e78bb8cd2e95b726e 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -163,9 +163,9 @@ ExtensionProcessManager::ExtensionProcessManager(Profile* profile)
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(original_profile));
}
- registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_OPENING,
+ registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_AGENT_ATTACHED,
content::Source<content::BrowserContext>(profile));
- registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
+ registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_AGENT_DETACHED,
content::Source<content::BrowserContext>(profile));
event_page_idle_time_ = base::TimeDelta::FromSeconds(10);
@@ -629,7 +629,7 @@ void ExtensionProcessManager::Observe(
break;
}
- case content::NOTIFICATION_DEVTOOLS_WINDOW_OPENING: {
+ case content::NOTIFICATION_DEVTOOLS_AGENT_ATTACHED: {
RenderViewHost* render_view_host =
content::Details<RenderViewHost>(details).ptr();
WebContents* web_contents =
@@ -640,13 +640,15 @@ void ExtensionProcessManager::Observe(
chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
const Extension* extension = GetExtensionForRenderViewHost(
render_view_host);
- if (extension)
+ if (extension) {
+ CancelSuspend(extension);
IncrementLazyKeepaliveCount(extension);
+ }
}
break;
}
- case content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING: {
+ case content::NOTIFICATION_DEVTOOLS_AGENT_DETACHED: {
RenderViewHost* render_view_host =
content::Details<RenderViewHost>(details).ptr();
WebContents* web_contents =
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698