// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_RENDERER_BINDINGS_LISTENER_TRACKER_H_ #define EXTENSIONS_RENDERER_BINDINGS_LISTENER_TRACKER_H_ #include <map> #include <memory> #include <string> #include <utility> #include "base/values.h" #include "extensions/common/event_filter.h" #include "extensions/common/mojom/event_dispatcher.mojom-forward.h" namespace extensions { class EventFilter; class ValueCounter; // A class to track all event listeners across multiple v8::Contexts. Each // context has a "context owner", which may be the same across multiple // contexts. For instance, an extension may listen to the same event in // multiple pages. Since these contexts may have the same context owner, // tracking when a new listener is added requires looking at more than a // single context. // // TODO(devlin): We should incorporate the notifications for newly added/ // removed listeners into this class, rather than having callers worry about // it based on return values. class ListenerTracker { … }; } // namespace extensions #endif // EXTENSIONS_RENDERER_BINDINGS_LISTENER_TRACKER_H_