[Webkit-unassigned] [Bug 91196] Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 16 00:38:51 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=91196





--- Comment #8 from Pavel Feldman <pfeldman at chromium.org>  2012-07-16 00:38:50 PST ---
> The method InspectorController::connectFrontend() is mostly called by InspectorController::show() method except WebInspector::remoteFrontendConnected(). So in order for this refactoring, we need to call the connectFrontend(frontendChannel) before every call to InspectorController::show(). But this would bring a lot of changes and also might be erroneous. Hence added the method frontendChannel() in InspectorClient to give the frontendChannel*. This would convey that the InspectorFrontendChannel is owned by InspectorClient object.

I don't think an API that receives InspectorFrontendChannel on connection and returns it at any time makes sense. What if we change the controller code to:

InspectorFrontencChannel* channel = m_inspectorClient->openInspectorFrontend(this);
connectFrontend(channel);

This would mean that controller can use its client to create front-ends and upon front-end creation it receives its channel. Then you make all InspectorClientXX implementations inherit from InspectorClient and InspectorFrontendChannel and you return "this" in the openInspectorFrontend.

Note that chromium's openInspectorFrontend will return 0 which is Ok.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list