Web Inspector: [Canvas] support instrumenting canvases in iframes (backend side)
https://bugs.webkit.org/show_bug.cgi?id=107951

Reviewed by Pavel Feldman.

Source/WebCore:

Accept optional FrameId argument for captureFrame and startCapturing commands.
Add event to the protocol to inform about instrumented canvas context creation.

* inspector/Inspector.json:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
(WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::captureFrame):
(WebCore::InspectorCanvasAgent::startCapturing):
(WebCore::InspectorCanvasAgent::getTraceLog):
(WebCore::InspectorCanvasAgent::replayTraceLog):
(WebCore::InspectorCanvasAgent::getResourceInfo):
(WebCore::InspectorCanvasAgent::getResourceState):
(WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
(WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
(WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
(WebCore):
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::frameNavigated):
(WebCore::InspectorCanvasAgent::frameDetached):
* inspector/InspectorCanvasAgent.h:
(WebCore):
(WebCore::InspectorCanvasAgent::create):
(InspectorCanvasAgent):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):

LayoutTests:

Stub Canvas dispatcher for now to silence alerts in tests.

* inspector/profiler/canvas-profiler-test.js:
(initialize_CanvasWebGLProfilerTest.InspectorTest.enableCanvasAgent.InspectorBackend.registerCanvasDispatcher):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141098 268f45cc-cd09-0410-ab3c-d52691b4dbfc