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

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

Issue 2078021: First pass at experimental omnibox API. There are plenty of rough edges and (Closed)
Patch Set: no prefer_keyword Created 10 years, 7 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_message_service.cc
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index f3fb6a0a4088465c6bcc4979dfcf8643b902dd7f..2c7f693eb2f4d2e64b05582d7c12ace681624ea2 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -177,6 +177,12 @@ void ExtensionMessageService::RemoveEventListener(const std::string& event_name,
}
}
+bool ExtensionMessageService::HasEventListener(
+ const std::string& event_name) {
+ return (listeners_.find(event_name) != listeners_.end() &&
+ !listeners_[event_name].empty());
+}
+
void ExtensionMessageService::AllocatePortIdPair(int* port1, int* port2) {
AutoLock lock(next_port_id_lock_);
« no previous file with comments | « chrome/browser/extensions/extension_message_service.h ('k') | chrome/browser/extensions/extension_omnibox_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698