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

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

Issue 10025007: Convert tabs, windows, and extension APIs to feature system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 years, 8 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 | « chrome/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_render_message_filter.cc
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc
index c1a0eb82980ceae3f6ce3f2f2d1c05e332a7d3be..784553c75d79d0c68ab3c507a4b78103b2943cea 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc
@@ -352,14 +352,18 @@ void ChromeRenderMessageFilter::OnGetExtensionMessageBundleOnFileThread(
void ChromeRenderMessageFilter::OnExtensionAddListener(
const std::string& extension_id,
- const std::string& event_name) {
+ const std::string& event_name,
+ int context_type) {
content::RenderProcessHost* process =
content::RenderProcessHost::FromID(render_process_id_);
if (!process || !profile_->GetExtensionEventRouter())
return;
profile_->GetExtensionEventRouter()->AddEventListener(
- event_name, process, extension_id);
+ event_name,
+ extension_id,
+ process,
+ static_cast<extensions::Feature::Context>(context_type));
}
void ChromeRenderMessageFilter::OnExtensionRemoveListener(
@@ -375,10 +379,19 @@ void ChromeRenderMessageFilter::OnExtensionRemoveListener(
}
void ChromeRenderMessageFilter::OnExtensionAddLazyListener(
- const std::string& extension_id, const std::string& event_name) {
- if (profile_->GetExtensionEventRouter())
- profile_->GetExtensionEventRouter()->AddLazyEventListener(
- event_name, extension_id);
+ const std::string& extension_id,
+ const std::string& event_name,
+ int context_type) {
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(render_process_id_);
+ if (!process || !profile_->GetExtensionEventRouter())
+ return;
+
+ profile_->GetExtensionEventRouter()->AddLazyEventListener(
+ event_name,
+ extension_id,
+ process,
+ static_cast<extensions::Feature::Context>(context_type));
}
void ChromeRenderMessageFilter::OnExtensionRemoveLazyListener(
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698