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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 15 23:03:14 PDT 2012


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





--- Comment #7 from Vivek Galatage <vivekgalatage at gmail.com>  2012-07-15 23:03:13 PST ---
(In reply to comment #6)
> > We need to also introduce method like frontendChannel() in InspectorClient so as to refer this from InspectorController:
> > 
> > class InspectorClient {
> > public:
> >     virtual InspectorFrontendChannel* frontendChannel() const = 0;
> > }
> > 
> > The method would typically return "this" from the implementation(e.g. InspectorClientQt)
> 
> That would be wrong. The point of this refactoring is to separate the channel from the client. Your testing harness will be setting the generic channel, but the clients will be port-specific.
> 
> connectFrontend will receive frontend channel instance as a parameter and will store a raw pointer to it in the InspectorController. disconnectFrontend will clear that internal pointer.

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.

-- 
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