OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_COMMON_EVENT_FILTER_H_ | 5 #ifndef EXTENSIONS_COMMON_EVENT_FILTER_H_ |
6 #define EXTENSIONS_COMMON_EVENT_FILTER_H_ | 6 #define EXTENSIONS_COMMON_EVENT_FILTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
| 11 #include "base/macros.h" |
11 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
12 #include "components/url_matcher/url_matcher.h" | 13 #include "components/url_matcher/url_matcher.h" |
13 #include "extensions/common/event_filtering_info.h" | 14 #include "extensions/common/event_filtering_info.h" |
14 #include "extensions/common/event_matcher.h" | 15 #include "extensions/common/event_matcher.h" |
15 | 16 |
16 namespace extensions { | 17 namespace extensions { |
17 | 18 |
18 // Matches incoming events against a collection of EventMatchers. Each added | 19 // Matches incoming events against a collection of EventMatchers. Each added |
19 // EventMatcher is given an id which is returned by MatchEvent() when it is | 20 // EventMatcher is given an id which is returned by MatchEvent() when it is |
20 // passed a matching event. | 21 // passed a matching event. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 121 |
121 // Maps from event matcher ids to the name of the event they match on. | 122 // Maps from event matcher ids to the name of the event they match on. |
122 std::map<MatcherID, std::string> id_to_event_name_; | 123 std::map<MatcherID, std::string> id_to_event_name_; |
123 | 124 |
124 DISALLOW_COPY_AND_ASSIGN(EventFilter); | 125 DISALLOW_COPY_AND_ASSIGN(EventFilter); |
125 }; | 126 }; |
126 | 127 |
127 } // namespace extensions | 128 } // namespace extensions |
128 | 129 |
129 #endif // EXTENSIONS_COMMON_EVENT_FILTER_H_ | 130 #endif // EXTENSIONS_COMMON_EVENT_FILTER_H_ |
OLD | NEW |