Bug 68528 - Web Inspector: [Extensions API] allow resources to hook on click on resource links
Summary: Web Inspector: [Extensions API] allow resources to hook on click on resource ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 06:41 PDT by Andrey Kosyakov
Modified: 2011-11-30 09:38 PST (History)
9 users (show)

See Also:


Attachments
patch (6.36 KB, patch)
2011-09-21 06:43 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
patch (18.44 KB, patch)
2011-09-26 00:49 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
patch (22.61 KB, patch)
2011-09-26 01:13 PDT, Andrey Kosyakov
yurys: review+
Details | Formatted Diff | Diff
screenshot (enabled) (3.41 KB, image/png)
2011-09-26 01:48 PDT, Andrey Kosyakov
no flags Details
screenshot (disabled) (14.85 KB, text/plain)
2011-09-26 01:48 PDT, Andrey Kosyakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-09-21 06:41:40 PDT
This adds webInspector.panels.onResourceLinkClicked which allows extensions to intercept request to display resources. In case an extension adds a listener to this event, the default handling in front-end is disabled (i.e. resources are not opened in the resource panel).
Comment 1 Andrey Kosyakov 2011-09-21 06:43:25 PDT
Created attachment 108146 [details]
patch
Comment 2 Yury Semikhatsky 2011-09-21 07:21:44 PDT
Comment on attachment 108146 [details]
patch

As discussed offline, there should be one handler for the event and there should be a way to explicitly specify which extension handles the event(in case there are many): either a setting or a popup dialog with a list of potential handlers.
Comment 3 Andrey Kosyakov 2011-09-26 00:49:00 PDT
Created attachment 108638 [details]
patch

- only allow one handler to receive an event;
- added handler selection to the Settings screen;
- changed API interface from Event to a method that sets handler
Comment 4 Yury Semikhatsky 2011-09-26 01:04:24 PDT
Comment on attachment 108638 [details]
patch

HandlerRegistry.js is missing
Comment 5 Andrey Kosyakov 2011-09-26 01:13:53 PDT
Created attachment 108643 [details]
patch

- added missing file
Comment 6 Yury Semikhatsky 2011-09-26 01:37:55 PDT
Comment on attachment 108643 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=108643&action=review

> Source/WebCore/inspector/front-end/ExtensionAPI.js:247
> +        // Only send command if we either removed and existing handler or added handler and had none before.

typo: removed and existing
Comment 7 Andrey Kosyakov 2011-09-26 01:48:15 PDT
Created attachment 108646 [details]
screenshot (enabled)
Comment 8 Andrey Kosyakov 2011-09-26 01:48:50 PDT
Created attachment 108647 [details]
screenshot (disabled)
Comment 9 Andrey Kosyakov 2011-11-30 09:38:17 PST
Manually committed r95942: http://trac.webkit.org/changeset/95942