Web Inspector: [Canvas] refactoring in CanvasAgent to reduce code dups
https://bugs.webkit.org/show_bug.cgi?id=108064

Reviewed by Pavel Feldman.

Introduce private methods injectedScriptCanvasModule() in InspectorCanvasAgent to reduce much of code duplication.
Drive-by: in InspectorPageAgent.assertFrame convert "String" argument to "const String&".

* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::dropTraceLog):
(WebCore::InspectorCanvasAgent::captureFrame):
(WebCore::InspectorCanvasAgent::startCapturing):
(WebCore::InspectorCanvasAgent::stopCapturing):
(WebCore::InspectorCanvasAgent::getTraceLog):
(WebCore::InspectorCanvasAgent::replayTraceLog):
(WebCore::InspectorCanvasAgent::getResourceInfo):
(WebCore::InspectorCanvasAgent::getResourceState):
(WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
(WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
(WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
(WebCore):
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
* inspector/InspectorCanvasAgent.h:
(InspectorCanvasAgent):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::assertFrame):
(WebCore::InspectorPageAgent::assertDocumentLoader):
* inspector/InspectorPageAgent.h:
(InspectorPageAgent):

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