Index: chrome/common/extensions/event_filter.h |
diff --git a/chrome/common/extensions/event_filter.h b/chrome/common/extensions/event_filter.h |
index 26acb4420adf2e433fe49dff38e77c15a9538dd8..9bac5198a6b0f385f88d023191a03e0c45bfd43d 100644 |
--- a/chrome/common/extensions/event_filter.h |
+++ b/chrome/common/extensions/event_filter.h |
@@ -29,6 +29,14 @@ class EventFilter { |
// the id of the matcher, or -1 if there was an error. |
MatcherID AddEventMatcher(const std::string& event_name, |
scoped_ptr<EventMatcher> matcher); |
+ |
+ // Retrieve the EventMatcher with the given id. |
+ EventMatcher* GetEventMatcher(MatcherID id); |
+ |
+ // Retrieve the name of the event that the EventMatcher specified by |id| is |
+ // referring to. |
+ const std::string& GetEventName(MatcherID id); |
+ |
// Removes an event matcher, returning the name of the event that it was for. |
std::string RemoveEventMatcher(MatcherID id); |
@@ -64,8 +72,8 @@ class EventFilter { |
// and clean them up anyway. |
void DontRemoveConditionSetsInDestructor(); |
- const EventMatcher& event_matcher() const { |
- return *event_matcher_; |
+ EventMatcher* event_matcher() const { |
battre
2012/06/13 09:22:04
remove this const?
koz (OOO until 15th September)
2012/06/14 02:22:25
Done.
|
+ return event_matcher_.get(); |
} |
private: |
@@ -86,7 +94,7 @@ class EventFilter { |
// Adds the list of filters to the URL matcher, having matches for those URLs |
// map to |id|. |
bool CreateConditionSets(MatcherID id, |
- base::ListValue* url_filters, |
+ EventMatcher* matcher, |
URLMatcherConditionSet::Vector* condition_sets); |
bool AddDictionaryAsConditionSet( |