summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/extensions/extension_dispatcher.h
diff options
context:
space:
mode:
authorkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-25 03:40:08 +0000
committerkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-25 03:40:08 +0000
commit64804d573437ccefc95c88306523850009fcc516 (patch)
tree6f82cee566aaa7075cb2726512bdc6b3cba7295d /chrome/renderer/extensions/extension_dispatcher.h
parentab95315836cae6073fac88174f50653c6b2b0025 (diff)
downloadchromium_src-64804d573437ccefc95c88306523850009fcc516.zip
chromium_src-64804d573437ccefc95c88306523850009fcc516.tar.gz
chromium_src-64804d573437ccefc95c88306523850009fcc516.tar.bz2
Filtered events.
Makes web_navigation events support filters, eg: chrome.webNavigation.onBeforeCommitted.addListener(callback, {url: [{hostSuffix: 'google.com'}]}); Now callback will only be called when the event has a URL with a host suffix of google.com. BUG=121479 Review URL: https://chromiumcodereview.appspot.com/10514013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/extension_dispatcher.h')
-rw-r--r--chrome/renderer/extensions/extension_dispatcher.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/renderer/extensions/extension_dispatcher.h b/chrome/renderer/extensions/extension_dispatcher.h
index ea2f9c1..4947f48 100644
--- a/chrome/renderer/extensions/extension_dispatcher.h
+++ b/chrome/renderer/extensions/extension_dispatcher.h
@@ -13,6 +13,7 @@
#include "base/shared_memory.h"
#include "base/timer.h"
#include "content/public/renderer/render_process_observer.h"
+#include "chrome/common/extensions/event_filter.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/features/feature.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
@@ -28,6 +29,10 @@ class URLPattern;
class UserScriptSlave;
struct ExtensionMsg_Loaded_Params;
+namespace extensions {
+class FilteredEventRouter;
+}
+
namespace WebKit {
class WebFrame;
}
@@ -258,6 +263,10 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
// TODO(aa): Remove when we can restrict non-permission APIs to dev-only.
int chrome_channel_;
+ // Routes events to the appropriate listener taking into consideration event
+ // filters.
+ scoped_ptr<extensions::EventFilter> event_filter_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher);
};