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

Unified Diff: extensions/common/event_filtering_info.cc

Issue 1099553002: extensions: windows: list all windows from the current profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 4 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/common/event_filtering_info.h ('k') | extensions/common/event_matcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/event_filtering_info.cc
diff --git a/extensions/common/event_filtering_info.cc b/extensions/common/event_filtering_info.cc
index 21809841cc441b82c43f9058f5dba682fe293215..c585de97496713dc704ba0aa9794c8c011dc2fb8 100644
--- a/extensions/common/event_filtering_info.cc
+++ b/extensions/common/event_filtering_info.cc
@@ -12,12 +12,17 @@ namespace extensions {
EventFilteringInfo::EventFilteringInfo()
: has_url_(false),
has_instance_id_(false),
- instance_id_(0) {
-}
+ instance_id_(0),
+ has_window_type_(false) {}
EventFilteringInfo::~EventFilteringInfo() {
}
+void EventFilteringInfo::SetWindowType(const std::string& window_type) {
+ window_type_ = window_type;
+ has_window_type_ = true;
+}
+
void EventFilteringInfo::SetURL(const GURL& url) {
url_ = url;
has_url_ = true;
@@ -42,11 +47,15 @@ scoped_ptr<base::Value> EventFilteringInfo::AsValue() const {
if (!service_type_.empty())
result->SetString("serviceType", service_type_);
+ if (has_window_type_)
+ result->SetString("windowType", window_type_);
+
return result.Pass();
}
bool EventFilteringInfo::IsEmpty() const {
- return !has_url_ && service_type_.empty() && !has_instance_id_;
+ return !has_window_type_ && !has_url_ && service_type_.empty() &&
+ !has_instance_id_;
}
} // namespace extensions
« no previous file with comments | « extensions/common/event_filtering_info.h ('k') | extensions/common/event_matcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698