One of the wonderful aspects of WebInspector is its use of 100% Web technology. I have leverage this aspect to embed WebInspector in a Web app and in a Chrome browser extension. I was able to hook the load sequence of the code to adapt the WebInspector to alternative backend connections (chrome.debugger API and WebSockets without using the built-in instance).
The only small problem I hit was in loading extensions: the postMessage system uses 'top' in two places, but when embedded the WebInspector will not be 'top'. By replacing these uses with 'window.parent' the WebInspector is iframeable.
Created attachment 154791 [details]
Comment on attachment 154791 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=154791&action=review
Please resubmit with proper changle log so that I could CQ+ it
> + Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!).
Remove this line
Created attachment 154986 [details]
Note I changed the patch to catch one more "top." over in Source/WebKit/chromium. I think this change would only help if embedders can figure out how to use unmodified devtools extensions, but I added it to be consistent with the other changes.
Comment on attachment 154986 [details]
Clearing flags on attachment: 154986
Committed r123902: <http://trac.webkit.org/changeset/123902>
All reviewed patches have been landed. Closing bug.