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

Side by Side Diff: extensions/renderer/api_event_handler.h

Issue 2937623002: [Extensions] Simplify EventFilteringInfo (Closed)
Patch Set: karan's Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « extensions/common/event_matcher.cc ('k') | extensions/renderer/api_event_listeners.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_RENDERER_API_EVENT_HANDLER_H_ 5 #ifndef EXTENSIONS_RENDERER_API_EVENT_HANDLER_H_
6 #define EXTENSIONS_RENDERER_API_EVENT_HANDLER_H_ 6 #define EXTENSIONS_RENDERER_API_EVENT_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "extensions/common/event_filter.h" 12 #include "extensions/common/event_filter.h"
13 #include "extensions/renderer/api_binding_types.h" 13 #include "extensions/renderer/api_binding_types.h"
14 #include "extensions/renderer/event_emitter.h" 14 #include "extensions/renderer/event_emitter.h"
15 #include "v8/include/v8.h" 15 #include "v8/include/v8.h"
16 16
17 namespace base { 17 namespace base {
18 class ListValue; 18 class ListValue;
19 } 19 }
20 20
21 namespace extensions { 21 namespace extensions {
22 class EventFilteringInfo; 22 struct EventFilteringInfo;
23 23
24 // The object to handle API events. This includes vending v8::Objects for the 24 // The object to handle API events. This includes vending v8::Objects for the
25 // event; handling adding, removing, and querying listeners; and firing events 25 // event; handling adding, removing, and querying listeners; and firing events
26 // to subscribed listeners. Designed to be used across JS contexts, but on a 26 // to subscribed listeners. Designed to be used across JS contexts, but on a
27 // single thread. 27 // single thread.
28 class APIEventHandler { 28 class APIEventHandler {
29 public: 29 public:
30 // The callback to be called when event listeners change. |was_manual| 30 // The callback to be called when event listeners change. |was_manual|
31 // indicates that the change was due to an extension calling addListener or 31 // indicates that the change was due to an extension calling addListener or
32 // removeListener, rather than through something like context destruction. 32 // removeListener, rather than through something like context destruction.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // The associated EventFilter; shared across all contexts and events. 104 // The associated EventFilter; shared across all contexts and events.
105 EventFilter event_filter_; 105 EventFilter event_filter_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(APIEventHandler); 107 DISALLOW_COPY_AND_ASSIGN(APIEventHandler);
108 }; 108 };
109 109
110 } // namespace extensions 110 } // namespace extensions
111 111
112 #endif // EXTENSIONS_RENDERER_API_EVENT_HANDLER_H_ 112 #endif // EXTENSIONS_RENDERER_API_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « extensions/common/event_matcher.cc ('k') | extensions/renderer/api_event_listeners.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698