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

Side by Side Diff: extensions/common/event_filtering_info.h

Issue 2495213007: [Extensions] Use a separate IPC message for extension events (Closed)
Patch Set: lazyboys Created 4 years, 1 month 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/browser/event_router.cc ('k') | extensions/common/event_filtering_info.cc » ('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 (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_FILTERING_INFO_H_ 5 #ifndef EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_
6 #define EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ 6 #define EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 namespace base { 12 namespace base {
13 class Value; 13 class DictionaryValue;
14 } 14 }
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 // Extra information about an event that is used in event filtering. 18 // Extra information about an event that is used in event filtering.
19 // 19 //
20 // This is the information that is matched against criteria specified in JS 20 // This is the information that is matched against criteria specified in JS
21 // extension event listeners. Eg: 21 // extension event listeners. Eg:
22 // 22 //
23 // chrome.someApi.onSomeEvent.addListener(cb, 23 // chrome.someApi.onSomeEvent.addListener(cb,
(...skipping 29 matching lines...) Expand all
53 53
54 bool has_url() const { return has_url_; } 54 bool has_url() const { return has_url_; }
55 const GURL& url() const { return url_; } 55 const GURL& url() const { return url_; }
56 56
57 bool has_instance_id() const { return has_instance_id_; } 57 bool has_instance_id() const { return has_instance_id_; }
58 int instance_id() const { return instance_id_; } 58 int instance_id() const { return instance_id_; }
59 59
60 bool has_service_type() const { return !service_type_.empty(); } 60 bool has_service_type() const { return !service_type_.empty(); }
61 const std::string& service_type() const { return service_type_; } 61 const std::string& service_type() const { return service_type_; }
62 62
63 std::unique_ptr<base::Value> AsValue() const; 63 std::unique_ptr<base::DictionaryValue> AsValue() const;
64 bool IsEmpty() const;
65 64
66 private: 65 private:
67 bool has_url_; 66 bool has_url_;
68 GURL url_; 67 GURL url_;
69 std::string service_type_; 68 std::string service_type_;
70 69
71 bool has_instance_id_; 70 bool has_instance_id_;
72 int instance_id_; 71 int instance_id_;
73 72
74 bool has_window_type_; 73 bool has_window_type_;
75 std::string window_type_; 74 std::string window_type_;
76 75
77 bool has_window_exposed_by_default_; 76 bool has_window_exposed_by_default_;
78 bool window_exposed_by_default_; 77 bool window_exposed_by_default_;
79 78
80 // Allow implicit copy and assignment. 79 // Allow implicit copy and assignment.
81 }; 80 };
82 81
83 } // namespace extensions 82 } // namespace extensions
84 83
85 #endif // EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_ 84 #endif // EXTENSIONS_COMMON_EVENT_FILTERING_INFO_H_
OLDNEW
« 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