| Index: chrome/common/extensions/event_filtering_info.h
|
| diff --git a/chrome/common/extensions/event_filtering_info.h b/chrome/common/extensions/event_filtering_info.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e7077f1ba89bb213946d9a06349befbd6819a970
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/event_filtering_info.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_COMMON_EXTENSIONS_EVENT_FILTERING_INFO_H_
|
| +#define CHROME_COMMON_EXTENSIONS_EVENT_FILTERING_INFO_H_
|
| +#pragma once
|
| +
|
| +#include "googleurl/src/gurl.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +// Extra information about an event that is used in event filtering.
|
| +//
|
| +// This is the information that is matched against criteria specified in JS
|
| +// extension event listeners. Eg:
|
| +//
|
| +// chrome.someApi.onSomeEvent.addListener(cb,
|
| +// {url: [{hostSuffix: 'google.com'}],
|
| +// tabId: 1});
|
| +class EventFilteringInfo {
|
| + public:
|
| + EventFilteringInfo();
|
| + ~EventFilteringInfo();
|
| + void SetURL(const GURL& url);
|
| +
|
| + bool has_url() const { return has_url_; }
|
| + const GURL& url() const { return url_; }
|
| +
|
| + private:
|
| + bool has_url_;
|
| + GURL url_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(EventFilteringInfo);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_COMMON_EXTENSIONS_EVENT_FILTERING_INFO_H_
|
|
|