Web Inspector: rename WorkerAgent.setWorkerInspectionEnabled to WorkerAgent.enable and make it return error
https://bugs.webkit.org/show_bug.cgi?id=92545

Reviewed by Pavel Feldman.

Source/WebCore:

- Replaced WorkerAgent.setWorkerInspectionEnabled with WorkerAgent.enable/disable
- Replaced Preferences.exposeWorkersInspection with InspectorFrontendHost.canInspectWorkers()
  that tells if inspector front-end on the given platform can launch dedicated worker
  front-end.

* inspector/Inspector.json:
* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient):
* inspector/InspectorFrontendClientLocal.h:
(WebCore::InspectorFrontendClientLocal::canInspectWorkers):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::canInspectWorkers):
(WebCore):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::enable):
(WebCore):
(WebCore::InspectorWorkerAgent::disable):
* inspector/InspectorWorkerAgent.h:
(InspectorWorkerAgent):
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.setZoomFactor):
(.WebInspector.InspectorFrontendHostStub.prototype.canInspectWorkers):
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/Settings.js:

Source/WebKit/chromium:

Replaced Preferences.exposeWorkersInspection with InspectorFrontendHost.canInspectWorkers()
that tells if inspector front-end on the given platform can launch dedicated worker
front-end.

* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::canInspectWorkers):
(WebKit):
* src/InspectorFrontendClientImpl.h:
(InspectorFrontendClientImpl):
* src/js/DevTools.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed