[Webkit-unassigned] [Bug 52510] New: Web Inspector: further split InspectorController meta bug.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 15 04:31:26 PST 2011


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

           Summary: Web Inspector: further split InspectorController meta
                    bug.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Web Inspector
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: pfeldman at chromium.org
                CC: timothy at apple.com, rik at webkit.org, keishi at webkit.org,
                    pmuellr at yahoo.com, joepeck at webkit.org,
                    pfeldman at chromium.org, yurys at chromium.org,
                    bweinstein at apple.com, apavlov at chromium.org,
                    loislo at chromium.org


We've done a lot of great work in splitting various aspects of InspectorController during the last year. I think it is time for another iteration and here is what I would suggest:

[PLAN]
- InspectorController gets renamed to the InspectorAgent, it gets public API defined in the Inspector.idl [domain=Inspector]. It continues to own other agents.
- New InspectorController is created, it only contains non-instrumentation methods of the InspectorController. WebCore and WebKit use this API to control inspector (show it, close it, toggle various high-level functions):

    bool enabled() const;
    void show();
    void inspect(Node*);
    void close();

    void startUserInitiatedProfiling();
    void stopUserInitiatedProfiling();
    bool profilerEnabled() const;

    void showAndEnableDebugger();
    bool debuggerEnabled() const;

    void connectFrontend();
    void reuseFrontend();
    void disconnectFrontend();

- WebCore uses only static InspectorInstrumentation:: calls for feeding instrumentation information to the inspector. Its implementation, InspectorInstrumentationImpl is aware of the agent(s) it should dispatch signals to.
- Each Agent inherits from two interfaces: one is generated from the corresponding Inspector.idl domain (and is only used for dispatching), the other is used by the internal clients: InspectorInstrumentationImpl, InspectorController and other agents. For example:

class InspectorDebuggerAgent {
public:
    void resume();
}
}

class InspectorDebuggerDispatch {
// Generate from inspector.idl...
}

class InspectorDebuggerAgentImpl : public InspectorDebuggerAgent, public InspectorDebuggerDispatch {
...
}

InspectorInstrumentationImpl and other inspector internals only see "InspectorDebuggerAgent" aspect.

[STEPS]
- Rename InspectorController to InspectorAgent
- Replace all the direct instrumentation calls to the inspectorController() with InspectorInstrumentation:: wrapper delegating to the new InspectorAgent instance.
- InspectorInstrumentation gets a static binding from Page to InspectorAgent (in order to hide latter from WebCore)
- Generate dispatch interfaces for all agents
- Provide inspector internals with pointers to pure agent APIs only

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