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

Unified Diff: extensions/common/event_filtering_info.h

Issue 2940893002: [Extensions] Pass EventFilteringInfo directly in DispatchEvent message (Closed)
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/event_router.cc ('k') | extensions/common/event_filtering_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/event_filtering_info.h
diff --git a/extensions/common/event_filtering_info.h b/extensions/common/event_filtering_info.h
index 9b81c48d85cc471950c77c9c046a31d08d1f0c4d..d940e46cd493700418012e0625424e2e60a33ff6 100644
--- a/extensions/common/event_filtering_info.h
+++ b/extensions/common/event_filtering_info.h
@@ -6,14 +6,11 @@
#define EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_
#include <memory>
+#include <string>
#include "base/optional.h"
#include "url/gurl.h"
-namespace base {
-class DictionaryValue;
-}
-
namespace extensions {
// Extra information about an event that is used in event filtering.
@@ -27,7 +24,6 @@ namespace extensions {
struct EventFilteringInfo {
public:
EventFilteringInfo();
- explicit EventFilteringInfo(const base::DictionaryValue& dict);
EventFilteringInfo(const EventFilteringInfo& other);
~EventFilteringInfo();
@@ -46,7 +42,10 @@ struct EventFilteringInfo {
// didn't set any filter on window types.
base::Optional<bool> window_exposed_by_default;
- std::unique_ptr<base::DictionaryValue> AsValue() const;
+ bool is_empty() const {
+ return !url && !service_type && !instance_id && !window_type &&
+ !window_exposed_by_default;
+ }
};
} // namespace extensions
« no previous file with comments | « extensions/browser/event_router.cc ('k') | extensions/common/event_filtering_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698