RESOLVED FIXED 52510
Web Inspector: further split InspectorController meta bug.
https://bugs.webkit.org/show_bug.cgi?id=52510
Summary Web Inspector: further split InspectorController meta bug.
Pavel Feldman
Reported 2011-01-15 04:31:25 PST
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
Attachments
[PATCH] Proposed change (98.17 KB, patch)
2011-01-16 05:42 PST, Pavel Feldman
no flags
Pavel Feldman
Comment 1 2011-01-16 05:42:04 PST
Created attachment 79095 [details] [PATCH] Proposed change
WebKit Review Bot
Comment 2 2011-01-16 05:43:22 PST
Attachment 79095 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/inspector/InspectorInstrumentation.h:146: The parameter name "database" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebCore/inspector/InspectorInstrumentation.h:154: The parameter name "context" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebCore/inspector/InspectorInstrumentation.h:155: The parameter name "context" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebCore/inspector/InspectorInstrumentation.h:254: The parameter name "database" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebCore/inspector/InspectorController.h:157: The parameter name "frame" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebCore/inspector/InspectorController.h:157: The parameter name "world" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 24 files If any of these errors are false positives, please file a bug against check-webkit-style.
Pavel Feldman
Comment 3 2011-01-16 10:29:45 PST
Comment on attachment 79095 [details] [PATCH] Proposed change (attached to wrong bug)
Note You need to log in before you can comment on or make changes to this bug.