[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 01:03:58 PDT 2012


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





--- Comment #10 from Vivek Galatage <vivekgalatage at gmail.com>  2012-07-16 01:03:56 PST ---
(In reply to comment #8)
> > 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.

This sounds perfect. 

(In reply to comment #9)
> It sounds like there are more connectFrontend() calls btw:
> 
> http://code.google.com/p/chromium/source/search?q=connectFrontend%5C%28%5C%29&origq=connectFrontend%5C%28%5C%29&btnG=Search+Trunk

Yes there are more number of calls but these are again from WorkerInspectorController. Also some of the port-specific calls I didn't mention earlier.

Are we targeting the WorkerInspectorController::connectFrontend method as well for refactoring?

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