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

Issue 2768093002: [Reland][Extensions Bindings] Add support for filtered events (Closed)

Created:
3 years, 9 months ago by Devlin
Modified:
3 years, 9 months ago
Reviewers:
lazyboy
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, jbroman
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Reland][Extensions Bindings] Add support for filtered events Some extension API events support "filtering", which allows extensions to only receive event notifications for a subset of the total events. For instance, the webNavigation API allows an extension to specify a set of url filters in order to specify which urls the listener is interested in, and not be notified of every navigation. Expand the native event bindings to support filtering for applicable events. Abstract out an APIEventListeners class to handle adding, removing, and querying event listeners, including retrieving those for certain filtering info. This currently has two implementations - FilteredEventListeners and UnfilteredFilteredEventListeners. Add tests for the same. Expand the end-to-end test with webNavigation events to test filtered events. Fix for reland: change the url in the web navigation test and allow old urls from previous test cases. BUG=653596 Review-Url: https://codereview.chromium.org/2768093002 Cr-Commit-Position: refs/heads/master@{#458962} Committed: https://chromium.googlesource.com/chromium/src/+/ddc50bcb9cd192d117d23e025ce39c5a4da33e19

Patch Set 1 #

Patch Set 2 : Fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1180 lines, -176 lines) Patch
M chrome/test/data/extensions/api_test/native_bindings/extension/background.js View 1 1 chunk +48 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/native_bindings/extension/manifest.json View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/native_bindings/simple2.html View 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/common/event_filtering_info.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/event_filtering_info.cc View 3 chunks +31 lines, -4 lines 0 comments Download
M extensions/renderer/BUILD.gn View 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/renderer/api_binding.cc View 3 chunks +11 lines, -3 lines 0 comments Download
M extensions/renderer/api_binding_js_util.h View 1 chunk +5 lines, -3 lines 0 comments Download
M extensions/renderer/api_binding_js_util.cc View 2 chunks +12 lines, -8 lines 0 comments Download
M extensions/renderer/api_binding_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/api_bindings_system.h View 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/api_bindings_system.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M extensions/renderer/api_bindings_system_unittest.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/api_bindings_system_unittest.cc View 3 chunks +3 lines, -1 line 0 comments Download
M extensions/renderer/api_event_handler.h View 6 chunks +9 lines, -1 line 0 comments Download
M extensions/renderer/api_event_handler.cc View 12 chunks +28 lines, -13 lines 0 comments Download
M extensions/renderer/api_event_handler_unittest.cc View 29 chunks +50 lines, -41 lines 0 comments Download
A extensions/renderer/api_event_listeners.h View 1 chunk +155 lines, -0 lines 0 comments Download
A extensions/renderer/api_event_listeners.cc View 1 chunk +254 lines, -0 lines 0 comments Download
A extensions/renderer/api_event_listeners_unittest.cc View 1 chunk +427 lines, -0 lines 0 comments Download
M extensions/renderer/chrome_setting.cc View 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/dispatcher.cc View 1 chunk +27 lines, -7 lines 0 comments Download
M extensions/renderer/event_emitter.h View 3 chunks +13 lines, -21 lines 0 comments Download
M extensions/renderer/event_emitter.cc View 8 chunks +42 lines, -36 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system.h View 2 chunks +3 lines, -1 line 0 comments Download
M extensions/renderer/native_extension_bindings_system.cc View 3 chunks +11 lines, -6 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system_unittest.cc View 5 chunks +15 lines, -15 lines 0 comments Download
M extensions/renderer/resources/guest_view/guest_view_events.js View 1 chunk +4 lines, -2 lines 0 comments Download
M extensions/renderer/resources/messaging.js View 2 chunks +10 lines, -8 lines 0 comments Download
M extensions/renderer/worker_thread_dispatcher.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 16 (10 generated)
Devlin
lazyboy@, mind taking a look? It seems like the tests were failing because other tabs ...
3 years, 9 months ago (2017-03-22 21:10:19 UTC) #6
lazyboy
chrome/test/data/extensions/api_test/native_bindings/extension/background.js changes lgtm
3 years, 9 months ago (2017-03-22 21:13:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2768093002/20001
3 years, 9 months ago (2017-03-22 22:41:45 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/345957)
3 years, 9 months ago (2017-03-22 23:45:57 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2768093002/20001
3 years, 9 months ago (2017-03-22 23:48:00 UTC) #13
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 00:57:24 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/ddc50bcb9cd192d117d23e025ce3...

Powered by Google App Engine
This is Rietveld 408576698