Skip to content
  • pfeldman@chromium.org's avatar
    Web Inspector: introduce InspectorFrontendAPI for actions initiated from the application menu. · 51a84606
    pfeldman@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=62985
    
    Source/WebCore:
    
    Both: inspector protocol and WebCore/InspectorController have a number of unnecessary
    methods for plumbing the menu action handlers through the WebKit and WebCore.
    I intend to remove this menu support from the protocol and WebCore/InspectorController API.
    I am starting with exposing the new front-end API in the WebCore and using it in the WebKit/mac port.
    WebKit/win and WebKit2 to follow.
    
    Reviewed by Yury Semikhatsky.
    
    * WebCore.exp.in:
    * WebCore.gypi:
    * WebCore.vcproj/WebCore.vcproj:
    * inspector/InspectorFrontendClientLocal.cpp:
    (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
    (WebCore::InspectorFrontendClientLocal::frontendLoaded):
    (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
    (WebCore::InspectorFrontendClientLocal::isDebuggingEnabled):
    (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
    (WebCore::InspectorFrontendClientLocal::isJavaScriptProfilingEnabled):
    (WebCore::InspectorFrontendClientLocal::setJavaScriptProfilingEnabled):
    (WebCore::InspectorFrontendClientLocal::isTimelineProfilingEnabled):
    (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
    (WebCore::InspectorFrontendClientLocal::isProfilingJavaScript):
    (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript):
    (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript):
    (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
    (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
    * inspector/InspectorFrontendClientLocal.h:
    * inspector/front-end/InspectorFrontendAPI.js: Added.
    (InspectorFrontendAPI.isDebuggingEnabled):
    (InspectorFrontendAPI.setDebuggingEnabled):
    (InspectorFrontendAPI.isJavaScriptProfilingEnabled):
    (InspectorFrontendAPI.setJavaScriptProfilingEnabled):
    (InspectorFrontendAPI.isTimelineProfilingEnabled):
    (InspectorFrontendAPI.setTimelineProfilingEnabled):
    (InspectorFrontendAPI.isProfilingJavaScript):
    (InspectorFrontendAPI.startProfilingJavaScript):
    (InspectorFrontendAPI.stopProfilingJavaScript):
    (InspectorFrontendAPI.setAttachedWindow):
    * inspector/front-end/ProfileView.js:
    (WebInspector.CPUProfileType):
    (WebInspector.CPUProfileType.prototype.isRecordingProfile):
    (WebInspector.CPUProfileType.prototype.startRecordingProfile):
    (WebInspector.CPUProfileType.prototype.stopRecordingProfile):
    * inspector/front-end/ProfilesPanel.js:
    (WebInspector.ProfilesPanel.prototype.get profilerEnabled):
    (WebInspector.ProfilesPanel.prototype.enableProfiler):
    (WebInspector.ProfilesPanel.prototype.disableProfiler):
    * inspector/front-end/ScriptsPanel.js:
    (WebInspector.ScriptsPanel):
    (WebInspector.ScriptsPanel.prototype.get debuggingEnabled):
    (WebInspector.ScriptsPanel.prototype.enableDebugging):
    (WebInspector.ScriptsPanel.prototype.disableDebugging):
    (WebInspector.ScriptsPanel.prototype.toggleDebugging):
    * inspector/front-end/TimelinePanel.js:
    (WebInspector.TimelinePanel.prototype._memoryOverviewItemSelected):
    (WebInspector.TimelinePanel.prototype.setTimelineProfilingEnabled):
    (WebInspector.TimelinePanel.prototype.get timelineProfilingEnabled):
    * inspector/front-end/WebKit.qrc:
    * inspector/front-end/inspector.html:
    * inspector/front-end/inspector.js:
    
    Source/WebKit/mac:
    
    Both: inspector protocol and WebCore/InspectorController have a number of unnecessary
    methods for plumbing the menu action handlers through the WebKit and WebCore.
    I intend to remove this menu support from the protocol and WebCore/InspectorController API.
    I am starting with exposing the new front-end API in the WebCore and using it in the WebKit/mac port.
    WebKit/win and WebKit2 to follow.
    
    Reviewed by Yury Semikhatsky.
    
    * WebCoreSupport/WebInspectorClient.mm:
    (-[WebInspectorWindowController destroyInspectorView:]):
    * WebInspector/WebInspector.mm:
    (-[WebInspector showWindow]):
    (-[WebInspector show:]):
    (-[WebInspector showConsole:]):
    (-[WebInspector isDebuggingJavaScript]):
    (-[WebInspector toggleDebuggingJavaScript:]):
    (-[WebInspector startDebuggingJavaScript:]):
    (-[WebInspector stopDebuggingJavaScript:]):
    (-[WebInspector isProfilingJavaScript]):
    (-[WebInspector toggleProfilingJavaScript:]):
    (-[WebInspector startProfilingJavaScript:]):
    (-[WebInspector stopProfilingJavaScript:]):
    (-[WebInspector isJavaScriptProfilingEnabled]):
    (-[WebInspector setJavaScriptProfilingEnabled:]):
    (-[WebInspector isTimelineProfilingEnabled]):
    (-[WebInspector setTimelineProfilingEnabled:]):
    (-[WebInspector setFrontend:]):
    (-[WebInspector releaseFrontend]):
    (-[WebInspector showWindow:]):
    * WebInspector/WebInspectorFrontend.h:
    * WebInspector/WebInspectorFrontend.mm:
    (-[WebInspectorFrontend isDebuggingEnabled]):
    (-[WebInspectorFrontend setDebuggingEnabled:]):
    (-[WebInspectorFrontend isProfilingJavaScript]):
    (-[WebInspectorFrontend startProfilingJavaScript]):
    (-[WebInspectorFrontend stopProfilingJavaScript]):
    (-[WebInspectorFrontend isJavaScriptProfilingEnabled]):
    (-[WebInspectorFrontend setJavaScriptProfilingEnabled:]):
    (-[WebInspectorFrontend isTimelineProfilingEnabled]):
    (-[WebInspectorFrontend setTimelineProfilingEnabled:]):
    * WebInspector/WebInspectorPrivate.h:
    
    Source/WebKit/win:
    
    Both: inspector protocol and WebCore/InspectorController have a number of unnecessary
    methods for plumbing the menu action handlers through the WebKit and WebCore.
    I intend to remove this menu support from the protocol and WebCore/InspectorController API.
    I am starting with exposing the new front-end API in the WebCore and using it in the WebKit/mac port.
    WebKit/win and WebKit2 to follow.
    
    Reviewed by Yury Semikhatsky.
    
    * WebInspector.cpp:
    (WebInspector::createInstance):
    (WebInspector::WebInspector):
    (WebInspector::webViewClosed):
    (WebInspector::showConsole):
    (WebInspector::isDebuggingJavaScript):
    (WebInspector::toggleDebuggingJavaScript):
    (WebInspector::isProfilingJavaScript):
    (WebInspector::toggleProfilingJavaScript):
    (WebInspector::isJavaScriptProfilingEnabled):
    (WebInspector::setJavaScriptProfilingEnabled):
    (WebInspector::isTimelineProfilingEnabled):
    (WebInspector::setTimelineProfilingEnabled):
    * WebInspector.h:
    * WebView.cpp:
    (WebView::WebView):
    (WebView::close):
    (WebView::initWithFrame):
    (WebView::inspector):
    * WebView.h:
    
    LayoutTests:
    
    Reviewed by Yury Semikhatsky.
    
    * http/tests/inspector/debugger-test.js:
    (initialize_DebuggerTest.InspectorTest.completeDebuggerTest.disableDebugger):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    51a84606