| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_EVENT_LISTENER_MAP_H_ | 5 #ifndef EXTENSIONS_BROWSER_EVENT_LISTENER_MAP_H_ |
| 6 #define EXTENSIONS_BROWSER_EVENT_LISTENER_MAP_H_ | 6 #define EXTENSIONS_BROWSER_EVENT_LISTENER_MAP_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "extensions/common/event_filter.h" | 15 #include "extensions/common/event_filter.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class DictionaryValue; | 19 class DictionaryValue; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 class BrowserContext; | 23 class BrowserContext; |
| 24 class RenderProcessHost; | 24 class RenderProcessHost; |
| 25 } | 25 } |
| 26 | 26 |
| 27 class ListenerRemovalListener; | |
| 28 | |
| 29 namespace extensions { | 27 namespace extensions { |
| 30 struct Event; | 28 struct Event; |
| 31 | 29 |
| 32 // A listener for an extension event. A listener is essentially an endpoint | 30 // A listener for an extension event. A listener is essentially an endpoint |
| 33 // that an event can be dispatched to. | 31 // that an event can be dispatched to. |
| 34 // | 32 // |
| 35 // This is a lazy listener if |IsLazy| is returns true, and a filtered listener | 33 // This is a lazy listener if |IsLazy| is returns true, and a filtered listener |
| 36 // if |filter| is defined. | 34 // if |filter| is defined. |
| 37 // | 35 // |
| 38 // A lazy listener is added to an event to indicate that a lazy background page | 36 // A lazy listener is added to an event to indicate that a lazy background page |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 std::map<EventFilter::MatcherID, EventListener*> listeners_by_matcher_id_; | 188 std::map<EventFilter::MatcherID, EventListener*> listeners_by_matcher_id_; |
| 191 | 189 |
| 192 EventFilter event_filter_; | 190 EventFilter event_filter_; |
| 193 | 191 |
| 194 DISALLOW_COPY_AND_ASSIGN(EventListenerMap); | 192 DISALLOW_COPY_AND_ASSIGN(EventListenerMap); |
| 195 }; | 193 }; |
| 196 | 194 |
| 197 } // namespace extensions | 195 } // namespace extensions |
| 198 | 196 |
| 199 #endif // EXTENSIONS_BROWSER_EVENT_LISTENER_MAP_H_ | 197 #endif // EXTENSIONS_BROWSER_EVENT_LISTENER_MAP_H_ |
| OLD | NEW |