| 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
|
|
|