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

Unified Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 125280: Send port-closed notification when a frame with ports unloads.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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: chrome/browser/renderer_host/browser_render_process_host.cc
===================================================================
--- chrome/browser/renderer_host/browser_render_process_host.cc (revision 18701)
+++ chrome/browser/renderer_host/browser_render_process_host.cc (working copy)
@@ -641,6 +641,8 @@
OnExtensionAddListener)
IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRemoveListener,
OnExtensionRemoveListener)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionCloseChannel,
+ OnExtensionCloseChannel)
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP_EX()
@@ -857,14 +859,17 @@
void BrowserRenderProcessHost::OnExtensionAddListener(
const std::string& event_name) {
- URLRequestContext* context = profile()->GetRequestContext();
- ExtensionMessageService* ems = ExtensionMessageService::GetInstance(context);
- ems->AddEventListener(event_name, pid());
+ ExtensionMessageService::GetInstance(profile()->GetRequestContext())->
+ AddEventListener(event_name, pid());
}
void BrowserRenderProcessHost::OnExtensionRemoveListener(
const std::string& event_name) {
- URLRequestContext* context = profile()->GetRequestContext();
- ExtensionMessageService* ems = ExtensionMessageService::GetInstance(context);
- ems->RemoveEventListener(event_name, pid());
+ ExtensionMessageService::GetInstance(profile()->GetRequestContext())->
+ RemoveEventListener(event_name, pid());
}
+
+void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) {
+ ExtensionMessageService::GetInstance(profile()->GetRequestContext())->
+ CloseChannel(port_id);
+}
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698