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

Unified Diff: extensions/browser/event_listener_map.h

Issue 411733002: WIP: diff which plumbs through the event URL. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « chrome/test/data/extensions/webui/send_message.js ('k') | extensions/browser/event_listener_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/event_listener_map.h
diff --git a/extensions/browser/event_listener_map.h b/extensions/browser/event_listener_map.h
index 163fc8f5cd9bad9bc7c37ec45ae71d5b96bc208a..f2c9cd5ff9bff465220fbc64befc6aece1cadae9 100644
--- a/extensions/browser/event_listener_map.h
+++ b/extensions/browser/event_listener_map.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "extensions/common/event_filter.h"
+#include "url/gurl.h"
namespace base {
class DictionaryValue;
@@ -37,7 +38,6 @@ struct Event;
// is listening to the event. It is associated with no process, so to dispatch
// an event to a lazy listener one must start a process running the associated
// extension and dispatch the event to that.
-//
class EventListener {
public:
// |filter| represents a generic filter structure that EventFilter knows how
@@ -49,6 +49,7 @@ class EventListener {
// }
EventListener(const std::string& event_name,
const std::string& extension_id,
+ const GURL& listener_url,
content::RenderProcessHost* process,
scoped_ptr<base::DictionaryValue> filter);
~EventListener();
@@ -67,8 +68,9 @@ class EventListener {
// IsLazy.
content::BrowserContext* GetBrowserContext() const;
- const std::string event_name() const { return event_name_; }
- const std::string extension_id() const { return extension_id_; }
+ const std::string& event_name() const { return event_name_; }
+ const std::string& extension_id() const { return extension_id_; }
+ const GURL& listener_url() const { return listener_url_; }
content::RenderProcessHost* process() const { return process_; }
base::DictionaryValue* filter() const { return filter_.get(); }
EventFilter::MatcherID matcher_id() const { return matcher_id_; }
@@ -77,6 +79,7 @@ class EventListener {
private:
const std::string event_name_;
const std::string extension_id_;
+ const GURL listener_url_;
content::RenderProcessHost* process_;
scoped_ptr<base::DictionaryValue> filter_;
EventFilter::MatcherID matcher_id_; // -1 if unset.
« no previous file with comments | « chrome/test/data/extensions/webui/send_message.js ('k') | extensions/browser/event_listener_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698