Prune dead code for Web Inspector canvas instrumentation.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Feb 2014 23:25:25 +0000 (23:25 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Feb 2014 23:25:25 +0000 (23:25 +0000)
<https://webkit.org/b/129269>

This was leftover code from Chromium's inspector. It's not used by
today's WebKit inspector.

Reviewed by Timothy Hatcher.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
* inspector/InjectedScriptCanvasModule.cpp: Removed.
* inspector/InjectedScriptCanvasModule.h: Removed.
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorCanvasAgent.cpp: Removed.
* inspector/InspectorCanvasAgent.h: Removed.
* inspector/InspectorCanvasInstrumentation.h: Removed.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::didBeginFrame):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/InstrumentingAgents.h:

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

20 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.am
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
Source/WebCore/inspector/InjectedScriptCanvasModule.cpp [deleted file]
Source/WebCore/inspector/InjectedScriptCanvasModule.h [deleted file]
Source/WebCore/inspector/InspectorAllInOne.cpp
Source/WebCore/inspector/InspectorCanvasAgent.cpp [deleted file]
Source/WebCore/inspector/InspectorCanvasAgent.h [deleted file]
Source/WebCore/inspector/InspectorCanvasInstrumentation.h [deleted file]
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InstrumentingAgents.cpp
Source/WebCore/inspector/InstrumentingAgents.h

index f7a5a8e92de9b590643a88bfb7efd24728183c42..f218efcbfa6cd90647496f7dafb826ad28988629 100644 (file)
@@ -1558,10 +1558,8 @@ set(WebCore_SOURCES
     inspector/CommandLineAPIModule.cpp
     inspector/DOMEditor.cpp
     inspector/DOMPatchSupport.cpp
-    inspector/InjectedScriptCanvasModule.cpp
     inspector/InspectorApplicationCacheAgent.cpp
     inspector/InspectorCSSAgent.cpp
-    inspector/InspectorCanvasAgent.cpp
     inspector/InspectorClient.cpp
     inspector/InspectorController.cpp
     inspector/InspectorCounters.cpp
@@ -3027,17 +3025,6 @@ add_custom_command(
 list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.h)
 
 
-# Generate InjectedScriptCanvasModuleSource.h
-add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.h ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.min.js
-    MAIN_DEPENDENCY inspector/InjectedScriptCanvasModuleSource.js
-    DEPENDS ${WebCore_INSPECTOR_SCRIPTS_DIR}/xxd.pl ${WebCore_INSPECTOR_SCRIPTS_DIR}/jsmin.py
-    COMMAND ${PYTHON_EXECUTABLE} ${WebCore_INSPECTOR_SCRIPTS_DIR}/jsmin.py < ${WEBCORE_DIR}/inspector/InjectedScriptCanvasModuleSource.js > ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.min.js
-    COMMAND ${PERL_EXECUTABLE} ${WebCore_INSPECTOR_SCRIPTS_DIR}/xxd.pl InjectedScriptCanvasModuleSource_js ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.min.js ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.h
-    VERBATIM)
-list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptCanvasModuleSource.h)
-
-
 MAKE_HASH_TOOLS(${WEBCORE_DIR}/platform/ColorData)
 list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/ColorData.cpp)
 
index 6e54bfd25575f388648fdad97d2dbaf8abd11238..9b7da33ca8cf04954fe836169ae99d376e32e60c 100644 (file)
@@ -1,3 +1,40 @@
+2014-02-24  Andreas Kling  <akling@apple.com>
+
+        Prune dead code for Web Inspector canvas instrumentation.
+        <https://webkit.org/b/129269>
+
+        This was leftover code from Chromium's inspector. It's not used by
+        today's WebKit inspector.
+
+        Reviewed by Timothy Hatcher.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSHTMLCanvasElementCustom.cpp:
+        (WebCore::JSHTMLCanvasElement::getContext):
+        * inspector/InjectedScriptCanvasModule.cpp: Removed.
+        * inspector/InjectedScriptCanvasModule.h: Removed.
+        * inspector/InspectorAllInOne.cpp:
+        * inspector/InspectorCanvasAgent.cpp: Removed.
+        * inspector/InspectorCanvasAgent.h: Removed.
+        * inspector/InspectorCanvasInstrumentation.h: Removed.
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        (WebCore::InspectorController::didBeginFrame):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
+        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
+        * inspector/InspectorInstrumentation.h:
+        * inspector/InstrumentingAgents.cpp:
+        (WebCore::InstrumentingAgents::InstrumentingAgents):
+        (WebCore::InstrumentingAgents::reset):
+        * inspector/InstrumentingAgents.h:
+
 2014-02-24  Zoltan Horvath  <zoltan@webkit.org>
 
         [CSS Shapes] Adjust lineTop position to the next available wrapping location at shape-outsides
index 8ceb5fc09bd19953aa508d553d65dabec800921a..c1aa4ccf50e3ed54f914a1404b50e2fa9ff9f7c3 100644 (file)
@@ -1143,13 +1143,6 @@ CommandLineAPIModuleSource.h : CommandLineAPIModuleSource.js
        perl $(InspectorScripts)/xxd.pl CommandLineAPIModuleSource_js ./CommandLineAPIModuleSource.min.js CommandLineAPIModuleSource.h
        rm -f ./CommandLineAPIModuleSource.min.js
 
-all : InjectedScriptCanvasModuleSource.h
-
-InjectedScriptCanvasModuleSource.h : InjectedScriptCanvasModuleSource.js
-       python $(InspectorScripts)/jsmin.py <$(WebCore)/inspector/InjectedScriptCanvasModuleSource.js > ./InjectedScriptCanvasModuleSource.min.js
-       perl $(InspectorScripts)/xxd.pl InjectedScriptCanvasModuleSource_js ./InjectedScriptCanvasModuleSource.min.js InjectedScriptCanvasModuleSource.h
-       rm -f ./InjectedScriptCanvasModuleSource.min.js
-
 -include $(JS_DOM_HEADERS:.h=.dep)
 
 # ------------------------
index 8ed1cc389a749d7954d8942f9116c1e00bb98009..a00b997c2165cdb36682ef3f21290835ec0e5839 100644 (file)
@@ -379,10 +379,6 @@ DerivedSources/WebCore/CommandLineAPIModuleSource.h: $(WebCore)/inspector/Comman
        $(AM_V_GEN)$(PYTHON) $(INSPECTOR_SCRIPTS_DIR)/jsmin.py <$(WebCore)/inspector/CommandLineAPIModuleSource.js > $(GENSOURCES_WEBCORE)/CommandLineAPIModuleSource.min.js
        $(AM_V_GEN)$(PERL) $(INSPECTOR_SCRIPTS_DIR)/xxd.pl CommandLineAPIModuleSource_js $(GENSOURCES_WEBCORE)/CommandLineAPIModuleSource.min.js $(GENSOURCES_WEBCORE)/CommandLineAPIModuleSource.h
 
-DerivedSources/WebCore/InjectedScriptCanvasModuleSource.h: $(WebCore)/inspector/InjectedScriptCanvasModuleSource.js
-       $(AM_V_GEN)$(PYTHON) $(INSPECTOR_SCRIPTS_DIR)/jsmin.py <$(WebCore)/inspector/InjectedScriptCanvasModuleSource.js > $(GENSOURCES_WEBCORE)/InjectedScriptCanvasModuleSource.min.js
-       $(AM_V_GEN)$(PERL) $(INSPECTOR_SCRIPTS_DIR)/xxd.pl InjectedScriptCanvasModuleSource_js $(GENSOURCES_WEBCORE)/InjectedScriptCanvasModuleSource.min.js $(GENSOURCES_WEBCORE)/InjectedScriptCanvasModuleSource.h
-
 if ENABLE_WEB_AUDIO
 # Installing HRTF database wav files
 audiodir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/resources/audio/
@@ -701,7 +697,6 @@ EXTRA_DIST += \
        Source/WebCore/html/parser/create-html-entity-table \
        Source/WebCore/html/parser/HTMLEntityNames.in \
        Source/WebCore/icu/LICENSE \
-       Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js \
        Source/WebCore/inspector/InspectorOverlayPage.html \
        Source/WebCore/LICENSE-APPLE \
        Source/WebCore/LICENSE-LGPL-2 \
index 6765af4e5ada1900bdeeaf0a6ffc821f32a6dfa3..e12822ef14097a5e68d93cdc2694f650c0003a03 100644 (file)
@@ -20,7 +20,6 @@ webcore_built_sources += \
        DerivedSources/WebCore/HTMLEntityTable.cpp \
        DerivedSources/WebCore/HTMLNames.cpp \
        DerivedSources/WebCore/HTMLNames.h \
-       DerivedSources/WebCore/InjectedScriptCanvasModuleSource.h \
        DerivedSources/WebCore/InspectorOverlayPage.h \
        DerivedSources/WebCore/InspectorWebBackendDispatchers.cpp \
        DerivedSources/WebCore/InspectorWebBackendDispatchers.h \
@@ -3756,15 +3755,10 @@ webcore_sources += \
        Source/WebCore/inspector/DOMEditor.h \
        Source/WebCore/inspector/DOMPatchSupport.cpp \
        Source/WebCore/inspector/DOMPatchSupport.h \
-       Source/WebCore/inspector/InjectedScriptCanvasModule.cpp \
-       Source/WebCore/inspector/InjectedScriptCanvasModule.h \
        Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp \
        Source/WebCore/inspector/InspectorApplicationCacheAgent.h \
        Source/WebCore/inspector/InspectorCSSAgent.cpp \
        Source/WebCore/inspector/InspectorCSSAgent.h \
-       Source/WebCore/inspector/InspectorCanvasAgent.cpp \
-       Source/WebCore/inspector/InspectorCanvasAgent.h \
-       Source/WebCore/inspector/InspectorCanvasInstrumentation.h \
        Source/WebCore/inspector/InspectorClient.cpp \
        Source/WebCore/inspector/InspectorClient.h \
        Source/WebCore/inspector/InspectorConsoleInstrumentation.h \
index ad5f1458f85472aef091fecde10a4fc0ac43146d..aca42c7b007b285dff5265d3ecd32d06b6b4f393 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="..\inspector\InjectedScriptCanvasModule.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="..\inspector\InspectorAllInOne.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="..\inspector\InspectorCanvasAgent.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="..\inspector\InspectorClient.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HTMLElementFactory.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HTMLElementTypeHelpers.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HTMLNames.h" />
-    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InjectedScriptCanvasModuleSource.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorOverlayPage.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorWebBackendDispatchers.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorWebFrontendDispatchers.h" />
     <ClInclude Include="..\inspector\CommandLineAPIModule.h" />
     <ClInclude Include="..\inspector\DOMEditor.h" />
     <ClInclude Include="..\inspector\DOMPatchSupport.h" />
-    <ClInclude Include="..\inspector\InjectedScriptCanvasModule.h" />
     <ClInclude Include="..\inspector\InspectorApplicationCacheAgent.h" />
-    <ClInclude Include="..\inspector\InspectorCanvasAgent.h" />
-    <ClInclude Include="..\inspector\InspectorCanvasInstrumentation.h" />
     <ClInclude Include="..\inspector\InspectorClient.h" />
     <ClInclude Include="..\inspector\InspectorConsoleInstrumentation.h" />
     <ClInclude Include="..\inspector\InspectorController.h" />
index c55f027290a0d5b73a65c8963a2869607271da9e..aa3359367313368a62c52945aed4da8e32350d6a 100644 (file)
     <ClCompile Include="..\inspector\DOMPatchSupport.cpp">
       <Filter>inspector</Filter>
     </ClCompile>
-    <ClCompile Include="..\inspector\InjectedScriptCanvasModule.cpp">
-      <Filter>inspector</Filter>
-    </ClCompile>
     <ClCompile Include="..\inspector\InspectorAllInOne.cpp">
       <Filter>inspector</Filter>
     </ClCompile>
     <ClCompile Include="..\inspector\InspectorApplicationCacheAgent.cpp">
       <Filter>inspector</Filter>
     </ClCompile>
-    <ClCompile Include="..\inspector\InspectorCanvasAgent.cpp">
-      <Filter>inspector</Filter>
-    </ClCompile>
     <ClCompile Include="..\inspector\InspectorClient.cpp">
       <Filter>inspector</Filter>
     </ClCompile>
     <ClInclude Include="..\inspector\DOMPatchSupport.h">
       <Filter>inspector</Filter>
     </ClInclude>
-    <ClInclude Include="..\inspector\InjectedScriptCanvasModule.h">
-      <Filter>inspector</Filter>
-    </ClInclude>
     <ClInclude Include="..\inspector\InspectorApplicationCacheAgent.h">
       <Filter>inspector</Filter>
     </ClInclude>
-    <ClInclude Include="..\inspector\InspectorCanvasAgent.h">
-      <Filter>inspector</Filter>
-    </ClInclude>
-    <ClInclude Include="..\inspector\InspectorCanvasInstrumentation.h">
-      <Filter>inspector</Filter>
-    </ClInclude>
     <ClInclude Include="..\inspector\InspectorClient.h">
       <Filter>inspector</Filter>
     </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HTMLNames.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
-    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InjectedScriptCanvasModuleSource.h">
-      <Filter>DerivedSources</Filter>
-    </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorOverlayPage.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
index b8bf79012476216ded478f22ca9eb969c9d7fa57..88d0297a62b4b0092fa47ec566607613511e8c79 100644 (file)
                AA5F3B8D16CC33D100455EB0 /* PlatformSpeechSynthesizerMock.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE27B7516CBFC0D00623043 /* PlatformSpeechSynthesizerMock.h */; };
                AA5F3B8F16CC4B3900455EB0 /* PlatformSpeechSynthesizerMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAE27B7416CBFC0D00623043 /* PlatformSpeechSynthesizerMock.cpp */; };
                AA5F3B9116CC5BEB00455EB0 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */; };
-               AA73183E159255B900A93E6E /* InjectedScriptCanvasModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA73183C159255B900A93E6E /* InjectedScriptCanvasModule.cpp */; };
-               AA73183F159255B900A93E6E /* InjectedScriptCanvasModule.h in Headers */ = {isa = PBXBuildFile; fileRef = AA73183D159255B900A93E6E /* InjectedScriptCanvasModule.h */; };
                AA7FEEA416A4E6F3004C0C33 /* JSSpeechSynthesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA7FEE9C16A4E6F3004C0C33 /* JSSpeechSynthesis.cpp */; };
                AA7FEEA616A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA7FEE9E16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.cpp */; };
                AA7FEEA716A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7FEE9F16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.h */; };
                AAA728F916D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAA728F316D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm */; };
                AAC08CEF15F933D600F1E188 /* SVGImageChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = AAC08CED15F933D600F1E188 /* SVGImageChromeClient.h */; };
                AAC08CF315F941FD00F1E188 /* AccessibilitySVGRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = AAC08CF115F941FC00F1E188 /* AccessibilitySVGRoot.h */; };
-               AAD766EB157E502F00E85423 /* InspectorCanvasAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAD766E8157E502F00E85423 /* InspectorCanvasAgent.cpp */; };
-               AAD766EC157E502F00E85423 /* InspectorCanvasAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = AAD766E9157E502F00E85423 /* InspectorCanvasAgent.h */; };
-               AAD766ED157E502F00E85423 /* InspectorCanvasInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = AAD766EA157E502F00E85423 /* InspectorCanvasInstrumentation.h */; };
                AAF5B7B71524B6C50004CB49 /* WebSocketFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAF5B7B11524B4BD0004CB49 /* WebSocketFrame.cpp */; };
                AB23A32709BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB23A32509BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp */; };
                AB23A32809BBA7D00067CC53 /* BeforeTextInsertedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = AB23A32609BBA7D00067CC53 /* BeforeTextInsertedEvent.h */; };
                AA4C3A740B2B1679002334A2 /* InlineStyleSheetOwner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineStyleSheetOwner.cpp; sourceTree = "<group>"; };
                AA4C3A750B2B1679002334A2 /* InlineStyleSheetOwner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineStyleSheetOwner.h; sourceTree = "<group>"; };
                AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
-               AA73183C159255B900A93E6E /* InjectedScriptCanvasModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedScriptCanvasModule.cpp; sourceTree = "<group>"; };
-               AA73183D159255B900A93E6E /* InjectedScriptCanvasModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptCanvasModule.h; sourceTree = "<group>"; };
                AA7EA0AA17557B9000DF4643 /* UIRequestEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = UIRequestEvent.idl; sourceTree = "<group>"; };
                AA7FEE9C16A4E6F3004C0C33 /* JSSpeechSynthesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesis.cpp; sourceTree = "<group>"; };
                AA7FEE9E16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesisUtterance.cpp; sourceTree = "<group>"; };
                AA7FEEA016A4E6F3004C0C33 /* JSSpeechSynthesisVoice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesisVoice.cpp; sourceTree = "<group>"; };
                AA7FEEA116A4E6F3004C0C33 /* JSSpeechSynthesisVoice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSpeechSynthesisVoice.h; sourceTree = "<group>"; };
                AA7FEEAC16A4E74B004C0C33 /* JSSpeechSynthesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSpeechSynthesis.h; sourceTree = "<group>"; };
-               AA9030FE157E16A000276247 /* InjectedScriptCanvasModuleSource.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = InjectedScriptCanvasModuleSource.js; sourceTree = "<group>"; };
-               AA912750157E35A500454E54 /* InjectedScriptCanvasModuleSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptCanvasModuleSource.h; sourceTree = "<group>"; };
                AAA4FACE175D5CB300743873 /* JSUIRequestEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUIRequestEvent.h; sourceTree = "<group>"; };
                AAA4FACF175D5CB300743873 /* JSUIRequestEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSUIRequestEvent.cpp; sourceTree = "<group>"; };
                AAA728F016D1D8BC00D3BBC6 /* AccessibilityObjectIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityObjectIOS.mm; sourceTree = "<group>"; };
                AAC08CED15F933D600F1E188 /* SVGImageChromeClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageChromeClient.h; sourceTree = "<group>"; };
                AAC08CF015F941FC00F1E188 /* AccessibilitySVGRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilitySVGRoot.cpp; sourceTree = "<group>"; };
                AAC08CF115F941FC00F1E188 /* AccessibilitySVGRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilitySVGRoot.h; sourceTree = "<group>"; };
-               AAD766E8157E502F00E85423 /* InspectorCanvasAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorCanvasAgent.cpp; sourceTree = "<group>"; };
-               AAD766E9157E502F00E85423 /* InspectorCanvasAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorCanvasAgent.h; sourceTree = "<group>"; };
-               AAD766EA157E502F00E85423 /* InspectorCanvasInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorCanvasInstrumentation.h; sourceTree = "<group>"; };
                AAE27B7416CBFC0D00623043 /* PlatformSpeechSynthesizerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformSpeechSynthesizerMock.cpp; sourceTree = "<group>"; };
                AAE27B7516CBFC0D00623043 /* PlatformSpeechSynthesizerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformSpeechSynthesizerMock.h; sourceTree = "<group>"; };
                AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatformSpeechSynthesizerIOS.mm; path = ios/PlatformSpeechSynthesizerIOS.mm; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                A584FE2518637DAB00843B10 /* CommandLineAPIModuleSource.h */,
-                               AA912750157E35A500454E54 /* InjectedScriptCanvasModuleSource.h */,
                                4F707A9711EF679400ACDA69 /* InspectorWebBackendDispatchers.cpp */,
                                4F707A9811EF679400ACDA69 /* InspectorWebBackendDispatchers.h */,
                                4F4F5FFA11CBD2D200A186BF /* InspectorWebFrontendDispatchers.cpp */,
                                7AABA25814BC613300AA9A11 /* DOMEditor.h */,
                                7A54881614E432A1006AE05A /* DOMPatchSupport.cpp */,
                                7A54881514E432A1006AE05A /* DOMPatchSupport.h */,
-                               AA73183C159255B900A93E6E /* InjectedScriptCanvasModule.cpp */,
-                               AA73183D159255B900A93E6E /* InjectedScriptCanvasModule.h */,
-                               AA9030FE157E16A000276247 /* InjectedScriptCanvasModuleSource.js */,
                                B885E8D211E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp */,
                                B885E8D311E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h */,
-                               AAD766E8157E502F00E85423 /* InspectorCanvasAgent.cpp */,
-                               AAD766E9157E502F00E85423 /* InspectorCanvasAgent.h */,
-                               AAD766EA157E502F00E85423 /* InspectorCanvasInstrumentation.h */,
                                7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */,
                                1C81B9580E97330800266E07 /* InspectorClient.h */,
                                F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */,
                                BE16C59517CFE17200852C04 /* InbandWebVTTTextTrack.h in Headers */,
                                DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */,
                                51D719F8181106E00016DC51 /* IndexedDB.h in Headers */,
-                               AA73183F159255B900A93E6E /* InjectedScriptCanvasModule.h in Headers */,
                                A8CFF5E50A155A05000A4234 /* InlineBox.h in Headers */,
                                B57CB52E182A3EFC0079A647 /* InlineElementBox.h in Headers */,
                                A8CFF5E30A155A05000A4234 /* InlineFlowBox.h in Headers */,
                                93309DF0099E64920056E581 /* InsertParagraphSeparatorCommand.h in Headers */,
                                93309DF2099E64920056E581 /* InsertTextCommand.h in Headers */,
                                B885E8D511E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h in Headers */,
-                               AAD766EC157E502F00E85423 /* InspectorCanvasAgent.h in Headers */,
-                               AAD766ED157E502F00E85423 /* InspectorCanvasInstrumentation.h in Headers */,
                                1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */,
                                F3F5CF1112ED81A80084C569 /* InspectorConsoleInstrumentation.h in Headers */,
                                1C81B95A0E97330800266E07 /* InspectorController.h in Headers */,
                                07367DE0172CA68200D861B9 /* InbandTextTrackPrivateLegacyAVFObjC.mm in Sources */,
                                BE16C59417CFE17200852C04 /* InbandWebVTTTextTrack.cpp in Sources */,
                                DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */,
-                               AA73183E159255B900A93E6E /* InjectedScriptCanvasModule.cpp in Sources */,
                                A8CFF5E60A155A05000A4234 /* InlineBox.cpp in Sources */,
                                B57CB52D182A3EED0079A647 /* InlineElementBox.cpp in Sources */,
                                A8CFF5E40A155A05000A4234 /* InlineFlowBox.cpp in Sources */,
                                93309DEF099E64920056E581 /* InsertParagraphSeparatorCommand.cpp in Sources */,
                                93309DF1099E64920056E581 /* InsertTextCommand.cpp in Sources */,
                                B885E8D411E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp in Sources */,
-                               AAD766EB157E502F00E85423 /* InspectorCanvasAgent.cpp in Sources */,
                                7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */,
                                1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */,
                                F325A40A14EE36FA007324E2 /* InspectorCounters.cpp in Sources */,
index 7ad36f8b2ac5594c203fc60657272bb63ce31775..374b9b956ce63b0c73bb1a3491be2adadb4a408f 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "CanvasContextAttributes.h"
 #include "HTMLCanvasElement.h"
-#include "InspectorCanvasInstrumentation.h"
 #include "JSCanvasRenderingContext2D.h"
 #include <bindings/ScriptObject.h>
 #include <wtf/GetPtr.h>
@@ -84,20 +83,7 @@ JSValue JSHTMLCanvasElement::getContext(ExecState* exec)
     CanvasRenderingContext* context = canvas.getContext(contextId, attrs.get());
     if (!context)
         return jsNull();
-    JSValue jsValue = toJS(exec, globalObject(), WTF::getPtr(context));
-    if (InspectorInstrumentation::canvasAgentEnabled(&canvas.document())) {
-        Deprecated::ScriptObject contextObject(exec, jsValue.getObject());
-        Deprecated::ScriptObject wrapped;
-        if (context->is2d())
-            wrapped = InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation(&canvas.document(), contextObject);
-#if ENABLE(WEBGL)
-        else if (context->is3d())
-            wrapped = InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation(&canvas.document(), contextObject);
-#endif
-        if (!wrapped.hasNoValue())
-            return wrapped.jsValue();
-    }
-    return jsValue;
+    return toJS(exec, globalObject(), WTF::getPtr(context));
 }
 
 JSValue JSHTMLCanvasElement::probablySupportsContext(ExecState* exec)
diff --git a/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp b/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp
deleted file mode 100644 (file)
index 08d2c8f..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "InjectedScriptCanvasModule.h"
-
-#include "InjectedScriptCanvasModuleSource.h"
-#include "JSMainThreadExecState.h"
-#include <bindings/ScriptFunctionCall.h>
-#include <bindings/ScriptObject.h>
-#include <inspector/InjectedScript.h>
-#include <inspector/InjectedScriptManager.h>
-#include <inspector/InspectorValues.h>
-
-using Inspector::TypeBuilder::Array;
-using Inspector::TypeBuilder::Canvas::ResourceId;
-using Inspector::TypeBuilder::Canvas::ResourceInfo;
-using Inspector::TypeBuilder::Canvas::ResourceState;
-using Inspector::TypeBuilder::Canvas::TraceLog;
-using Inspector::TypeBuilder::Canvas::TraceLogId;
-
-using namespace JSC;
-using namespace Inspector;
-
-namespace WebCore {
-
-InjectedScriptCanvasModule::InjectedScriptCanvasModule()
-    : Inspector::InjectedScriptModule("InjectedScriptCanvasModule")
-{
-}
-
-InjectedScriptCanvasModule InjectedScriptCanvasModule::moduleForState(InjectedScriptManager* injectedScriptManager, JSC::ExecState* scriptState)
-{
-    InjectedScriptCanvasModule result;
-    result.ensureInjected(injectedScriptManager, scriptState);
-    return result;
-}
-
-String InjectedScriptCanvasModule::source() const
-{
-    return String(reinterpret_cast<const char*>(InjectedScriptCanvasModuleSource_js), sizeof(InjectedScriptCanvasModuleSource_js));
-}
-
-JSC::JSValue InjectedScriptCanvasModule::host(InjectedScriptManager*, JSC::ExecState*) const
-{
-    return jsUndefined();
-}
-
-Deprecated::ScriptObject InjectedScriptCanvasModule::wrapCanvas2DContext(const Deprecated::ScriptObject& context)
-{
-    return callWrapContextFunction("wrapCanvas2DContext", context);
-}
-
-#if ENABLE(WEBGL)
-Deprecated::ScriptObject InjectedScriptCanvasModule::wrapWebGLContext(const Deprecated::ScriptObject& glContext)
-{
-    return callWrapContextFunction("wrapWebGLContext", glContext);
-}
-#endif // ENABLE(WEBGL)
-
-Deprecated::ScriptObject InjectedScriptCanvasModule::callWrapContextFunction(const String& functionName, const Deprecated::ScriptObject& context)
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), functionName, WebCore::functionCallHandlerFromAnyThread);
-    function.appendArgument(context);
-    bool hadException = false;
-    Deprecated::ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
-    if (hadException || resultValue.hasNoValue() || !resultValue.isObject()) {
-        ASSERT_NOT_REACHED();
-        return Deprecated::ScriptObject();
-    }
-    return Deprecated::ScriptObject(context.scriptState(), resultValue);
-}
-
-void InjectedScriptCanvasModule::markFrameEnd()
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "markFrameEnd", WebCore::functionCallHandlerFromAnyThread);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    ASSERT(resultValue);
-}
-
-void InjectedScriptCanvasModule::captureFrame(ErrorString* errorString, TraceLogId* traceLogId)
-{
-    callStartCapturingFunction("captureFrame", errorString, traceLogId);
-}
-
-void InjectedScriptCanvasModule::startCapturing(ErrorString* errorString, TraceLogId* traceLogId)
-{
-    callStartCapturingFunction("startCapturing", errorString, traceLogId);
-}
-
-void InjectedScriptCanvasModule::callStartCapturingFunction(const String& functionName, ErrorString* errorString, TraceLogId* traceLogId)
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), functionName, WebCore::functionCallHandlerFromAnyThread);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeString || !resultValue->asString(traceLogId))
-        *errorString = "Internal error: " + functionName;
-}
-
-void InjectedScriptCanvasModule::stopCapturing(ErrorString* errorString, const TraceLogId& traceLogId)
-{
-    callVoidFunctionWithTraceLogIdArgument("stopCapturing", errorString, traceLogId);
-}
-
-void InjectedScriptCanvasModule::dropTraceLog(ErrorString* errorString, const TraceLogId& traceLogId)
-{
-    callVoidFunctionWithTraceLogIdArgument("dropTraceLog", errorString, traceLogId);
-}
-
-void InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument(const String& functionName, ErrorString* errorString, const TraceLogId& traceLogId)
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), functionName, WebCore::functionCallHandlerFromAnyThread);
-    function.appendArgument(traceLogId);
-    bool hadException = false;
-    callFunctionWithEvalEnabled(function, hadException);
-    ASSERT(!hadException);
-    if (hadException)
-        *errorString = "Internal error: " + functionName;
-}
-
-void InjectedScriptCanvasModule::traceLog(ErrorString* errorString, const TraceLogId& traceLogId, const int* startOffset, const int* maxLength, RefPtr<TraceLog>* traceLog)
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "traceLog", WebCore::functionCallHandlerFromAnyThread);
-    function.appendArgument(traceLogId);
-    if (startOffset)
-        function.appendArgument(*startOffset);
-    if (maxLength)
-        function.appendArgument(*maxLength);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeObject) {
-        if (!resultValue->asString(errorString))
-            *errorString = "Internal error: traceLog";
-        return;
-    }
-    *traceLog = TraceLog::runtimeCast(resultValue);
-}
-
-void InjectedScriptCanvasModule::replayTraceLog(ErrorString* errorString, const TraceLogId& traceLogId, int stepNo, RefPtr<ResourceState>* result)
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "replayTraceLog", WebCore::functionCallHandlerFromAnyThread);
-    function.appendArgument(traceLogId);
-    function.appendArgument(stepNo);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeObject) {
-        if (!resultValue->asString(errorString))
-            *errorString = "Internal error: replayTraceLog";
-        return;
-    }
-    *result = ResourceState::runtimeCast(resultValue);
-}
-
-void InjectedScriptCanvasModule::resourceInfo(ErrorString* errorString, const ResourceId& resourceId, RefPtr<ResourceInfo>* result)
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "resourceInfo", WebCore::functionCallHandlerFromAnyThread);
-    function.appendArgument(resourceId);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeObject) {
-        if (!resultValue->asString(errorString))
-            *errorString = "Internal error: resourceInfo";
-        return;
-    }
-    *result = ResourceInfo::runtimeCast(resultValue);
-}
-
-void InjectedScriptCanvasModule::resourceState(ErrorString* errorString, const TraceLogId& traceLogId, const ResourceId& resourceId, RefPtr<ResourceState>* result)
-{
-    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "resourceState", WebCore::functionCallHandlerFromAnyThread);
-    function.appendArgument(traceLogId);
-    function.appendArgument(resourceId);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeObject) {
-        if (!resultValue->asString(errorString))
-            *errorString = "Internal error: resourceState";
-        return;
-    }
-    *result = ResourceState::runtimeCast(resultValue);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/InjectedScriptCanvasModule.h b/Source/WebCore/inspector/InjectedScriptCanvasModule.h
deleted file mode 100644 (file)
index 86ba700..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InjectedScriptCanvasModule_h
-#define InjectedScriptCanvasModule_h
-
-#include "InspectorWebTypeBuilders.h"
-#include "ScriptState.h"
-#include <inspector/InjectedScriptModule.h>
-#include <wtf/text/WTFString.h>
-
-namespace Deprecated {
-class ScriptObject;
-}
-
-namespace WebCore {
-
-typedef String ErrorString;
-
-#if ENABLE(INSPECTOR)
-
-class InjectedScriptCanvasModule final : public Inspector::InjectedScriptModule {
-public:
-    InjectedScriptCanvasModule();
-    
-    virtual String source() const override;
-    virtual JSC::JSValue host(Inspector::InjectedScriptManager*, JSC::ExecState*) const override;
-    virtual bool returnsObject() const override { return true; }
-
-    static InjectedScriptCanvasModule moduleForState(Inspector::InjectedScriptManager*, JSC::ExecState*);
-
-    Deprecated::ScriptObject wrapCanvas2DContext(const Deprecated::ScriptObject&);
-#if ENABLE(WEBGL)
-    Deprecated::ScriptObject wrapWebGLContext(const Deprecated::ScriptObject&);
-#endif
-    void markFrameEnd();
-
-    void captureFrame(ErrorString*, Inspector::TypeBuilder::Canvas::TraceLogId*);
-    void startCapturing(ErrorString*, Inspector::TypeBuilder::Canvas::TraceLogId*);
-    void stopCapturing(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&);
-    void dropTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&);
-    void traceLog(ErrorString*, const String&, const int*, const int*, RefPtr<Inspector::TypeBuilder::Canvas::TraceLog>*);
-    void replayTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, int, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>*);
-    void resourceInfo(ErrorString*, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceInfo>*);
-    void resourceState(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>*);
-
-private:
-    Deprecated::ScriptObject callWrapContextFunction(const String&, const Deprecated::ScriptObject&);
-    void callStartCapturingFunction(const String&, ErrorString*, String*);
-    void callVoidFunctionWithTraceLogIdArgument(const String&, ErrorString*, const String&);
-};
-
-#endif
-
-} // namespace WebCore
-
-#endif // !defined(InjectedScriptCanvasModule_h)
index 5247a968440a72ff86b6e5e3398c64dac843bade..0e914d3e8f322e49b0d9aff841ca527e3f9cac1e 100644 (file)
 #include "CommandLineAPIModule.cpp"
 #include "DOMEditor.cpp"
 #include "DOMPatchSupport.cpp"
-#include "InjectedScriptCanvasModule.cpp"
 #include "InspectorApplicationCacheAgent.cpp"
 #include "InspectorCSSAgent.cpp"
-#include "InspectorCanvasAgent.cpp"
 #include "InspectorClient.cpp"
 #include "InspectorController.cpp"
 #include "InspectorCounters.cpp"
diff --git a/Source/WebCore/inspector/InspectorCanvasAgent.cpp b/Source/WebCore/inspector/InspectorCanvasAgent.cpp
deleted file mode 100644 (file)
index 95258ef..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorCanvasAgent.h"
-
-#include "DOMWindow.h"
-#include "HTMLCanvasElement.h"
-#include "HTMLNames.h"
-#include "InjectedScriptCanvasModule.h"
-#include "InspectorPageAgent.h"
-#include "InspectorWebFrontendDispatchers.h"
-#include "InstrumentingAgents.h"
-#include "MainFrame.h"
-#include "NodeList.h"
-#include "Page.h"
-#include "ScriptProfiler.h"
-#include "ScriptState.h"
-#include <bindings/ScriptObject.h>
-#include <inspector/InjectedScript.h>
-#include <inspector/InjectedScriptManager.h>
-
-using Inspector::TypeBuilder::Array;
-using Inspector::TypeBuilder::Canvas::ResourceId;
-using Inspector::TypeBuilder::Canvas::ResourceInfo;
-using Inspector::TypeBuilder::Canvas::ResourceState;
-using Inspector::TypeBuilder::Canvas::TraceLog;
-using Inspector::TypeBuilder::Canvas::TraceLogId;
-using Inspector::TypeBuilder::Network::FrameId;
-
-using namespace Inspector;
-
-namespace WebCore {
-
-InspectorCanvasAgent::InspectorCanvasAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager)
-    : InspectorAgentBase(ASCIILiteral("Canvas"), instrumentingAgents)
-    , m_pageAgent(pageAgent)
-    , m_injectedScriptManager(injectedScriptManager)
-    , m_enabled(false)
-{
-}
-
-InspectorCanvasAgent::~InspectorCanvasAgent()
-{
-}
-
-void InspectorCanvasAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
-{
-    m_frontendDispatcher = std::make_unique<InspectorCanvasFrontendDispatcher>(frontendChannel);
-    m_backendDispatcher = InspectorCanvasBackendDispatcher::create(backendDispatcher, this);
-}
-
-void InspectorCanvasAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
-{
-    m_frontendDispatcher = nullptr;
-    m_backendDispatcher.clear();
-
-    disable(nullptr);
-}
-
-void InspectorCanvasAgent::enable(ErrorString*)
-{
-    if (m_enabled)
-        return;
-    m_enabled = true;
-    m_instrumentingAgents->setInspectorCanvasAgent(this);
-    findFramesWithUninstrumentedCanvases();
-}
-
-void InspectorCanvasAgent::disable(ErrorString*)
-{
-    m_enabled = false;
-    m_instrumentingAgents->setInspectorCanvasAgent(nullptr);
-    m_framesWithUninstrumentedCanvases.clear();
-}
-
-void InspectorCanvasAgent::dropTraceLog(ErrorString* errorString, const TraceLogId& traceLogId)
-{
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.dropTraceLog(errorString, traceLogId);
-}
-
-void InspectorCanvasAgent::hasUninstrumentedCanvases(ErrorString* errorString, bool* result)
-{
-    if (!checkIsEnabled(errorString))
-        return;
-    for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) {
-        if (it->value) {
-            *result = true;
-            return;
-        }
-    }
-    *result = false;
-}
-
-void InspectorCanvasAgent::captureFrame(ErrorString* errorString, const FrameId* frameId, TraceLogId* traceLogId)
-{
-    Frame* frame = frameId ? m_pageAgent->assertFrame(errorString, *frameId) : m_pageAgent->mainFrame();
-    if (!frame)
-        return;
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldExecState(frame));
-    if (!module.hasNoValue())
-        module.captureFrame(errorString, traceLogId);
-}
-
-void InspectorCanvasAgent::startCapturing(ErrorString* errorString, const FrameId* frameId, TraceLogId* traceLogId)
-{
-    Frame* frame = frameId ? m_pageAgent->assertFrame(errorString, *frameId) : m_pageAgent->mainFrame();
-    if (!frame)
-        return;
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldExecState(frame));
-    if (!module.hasNoValue())
-        module.startCapturing(errorString, traceLogId);
-}
-
-void InspectorCanvasAgent::stopCapturing(ErrorString* errorString, const TraceLogId& traceLogId)
-{
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.stopCapturing(errorString, traceLogId);
-}
-
-void InspectorCanvasAgent::getTraceLog(ErrorString* errorString, const TraceLogId& traceLogId, const int* startOffset, const int* maxLength, RefPtr<TraceLog>& traceLog)
-{
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.traceLog(errorString, traceLogId, startOffset, maxLength, &traceLog);
-}
-
-void InspectorCanvasAgent::replayTraceLog(ErrorString* errorString, const TraceLogId& traceLogId, int stepNo, RefPtr<ResourceState>& result)
-{
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.replayTraceLog(errorString, traceLogId, stepNo, &result);
-}
-
-void InspectorCanvasAgent::getResourceInfo(ErrorString* errorString, const ResourceId& resourceId, RefPtr<ResourceInfo>& result)
-{
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, resourceId);
-    if (!module.hasNoValue())
-        module.resourceInfo(errorString, resourceId, &result);
-}
-
-void InspectorCanvasAgent::getResourceState(ErrorString* errorString, const TraceLogId& traceLogId, const ResourceId& resourceId, RefPtr<ResourceState>& result)
-{
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.resourceState(errorString, traceLogId, resourceId, &result);
-}
-
-Deprecated::ScriptObject InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation(const Deprecated::ScriptObject& context)
-{
-    ErrorString error;
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, context);
-    if (module.hasNoValue())
-        return Deprecated::ScriptObject();
-    return notifyRenderingContextWasWrapped(module.wrapCanvas2DContext(context));
-}
-
-#if ENABLE(WEBGL)
-Deprecated::ScriptObject InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation(const Deprecated::ScriptObject& glContext)
-{
-    ErrorString error;
-    InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, glContext);
-    if (module.hasNoValue())
-        return Deprecated::ScriptObject();
-    return notifyRenderingContextWasWrapped(module.wrapWebGLContext(glContext));
-}
-#endif
-
-Deprecated::ScriptObject InspectorCanvasAgent::notifyRenderingContextWasWrapped(const Deprecated::ScriptObject& wrappedContext)
-{
-    ASSERT(m_frontendDispatcher);
-    JSC::ExecState* scriptState = wrappedContext.scriptState();
-    DOMWindow* domWindow = scriptState ? domWindowFromExecState(scriptState) : nullptr;
-    Frame* frame = domWindow ? domWindow->frame() : nullptr;
-    if (frame && !m_framesWithUninstrumentedCanvases.contains(frame))
-        m_framesWithUninstrumentedCanvases.set(frame, false);
-    String frameId = m_pageAgent->frameId(frame);
-    if (!frameId.isEmpty())
-        m_frontendDispatcher->contextCreated(frameId);
-    return wrappedContext;
-}
-
-InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, JSC::ExecState* scriptState)
-{
-    if (!checkIsEnabled(errorString))
-        return InjectedScriptCanvasModule();
-    InjectedScriptCanvasModule module = InjectedScriptCanvasModule::moduleForState(m_injectedScriptManager, scriptState);
-    if (module.hasNoValue()) {
-        ASSERT_NOT_REACHED();
-        *errorString = "Internal error: no Canvas module";
-    }
-    return module;
-}
-
-InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, const Deprecated::ScriptObject& scriptObject)
-{
-    if (!checkIsEnabled(errorString))
-        return InjectedScriptCanvasModule();
-    if (scriptObject.hasNoValue()) {
-        ASSERT_NOT_REACHED();
-        *errorString = "Internal error: original Deprecated::ScriptObject has no value";
-        return InjectedScriptCanvasModule();
-    }
-    return injectedScriptCanvasModule(errorString, scriptObject.scriptState());
-}
-
-InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, const String& objectId)
-{
-    if (!checkIsEnabled(errorString))
-        return InjectedScriptCanvasModule();
-    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
-    if (injectedScript.hasNoValue()) {
-        *errorString = "Inspected frame has gone";
-        return InjectedScriptCanvasModule();
-    }
-    return injectedScriptCanvasModule(errorString, injectedScript.scriptState());
-}
-
-void InspectorCanvasAgent::findFramesWithUninstrumentedCanvases()
-{
-    m_framesWithUninstrumentedCanvases.clear();
-
-    for (Frame* frame = &m_pageAgent->page()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
-        if (!frame->document())
-            continue;
-
-        RefPtr<NodeList> canvases = frame->document()->getElementsByTagName(HTMLNames::canvasTag.localName());
-        if (canvases) {
-            for (unsigned i = 0, length = canvases->length(); i < length; i++) {
-                const HTMLCanvasElement* canvas = toHTMLCanvasElement(canvases->item(i));
-                if (canvas->renderingContext()) {
-                    m_framesWithUninstrumentedCanvases.set(frame, true);
-                    break;
-                }
-            }
-        }
-    }
-
-    for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) {
-        String frameId = m_pageAgent->frameId(it->key);
-        if (!frameId.isEmpty())
-            m_frontendDispatcher->contextCreated(frameId);
-    }
-}
-
-bool InspectorCanvasAgent::checkIsEnabled(ErrorString* errorString) const
-{
-    if (m_enabled)
-        return true;
-    *errorString = "Canvas agent is not enabled";
-    return false;
-}
-
-void InspectorCanvasAgent::frameNavigated(Frame* frame)
-{
-    if (!m_enabled)
-        return;
-    if (frame == m_pageAgent->mainFrame()) {
-        for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it)
-            m_framesWithUninstrumentedCanvases.set(it->key, false);
-        m_frontendDispatcher->traceLogsRemoved(nullptr, nullptr);
-    } else {
-        while (frame) {
-            if (m_framesWithUninstrumentedCanvases.contains(frame))
-                m_framesWithUninstrumentedCanvases.set(frame, false);
-            if (m_pageAgent->hasIdForFrame(frame)) {
-                String frameId = m_pageAgent->frameId(frame);
-                m_frontendDispatcher->traceLogsRemoved(&frameId, nullptr);
-            }
-            frame = frame->tree().traverseNext();
-        }
-    }
-}
-
-void InspectorCanvasAgent::frameDetached(Frame* frame)
-{
-    if (m_enabled)
-        m_framesWithUninstrumentedCanvases.remove(frame);
-}
-
-void InspectorCanvasAgent::didBeginFrame()
-{
-    if (!m_enabled)
-        return;
-    ErrorString error;
-    for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) {
-        InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, mainWorldExecState(it->key));
-        if (!module.hasNoValue())
-            module.markFrameEnd();
-    }
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/InspectorCanvasAgent.h b/Source/WebCore/inspector/InspectorCanvasAgent.h
deleted file mode 100644 (file)
index fbe32c2..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InspectorCanvasAgent_h
-#define InspectorCanvasAgent_h
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorWebAgentBase.h"
-#include "InspectorWebBackendDispatchers.h"
-#include "InspectorWebFrontendDispatchers.h"
-#include "InspectorWebTypeBuilders.h"
-#include "ScriptState.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/text/WTFString.h>
-
-namespace Deprecated {
-class ScriptObject;
-}
-
-namespace Inspector {
-class InjectedScriptManager;
-}
-
-namespace WebCore {
-
-class Frame;
-class InjectedScriptCanvasModule;
-class InspectorPageAgent;
-class InstrumentingAgents;
-
-typedef String ErrorString;
-
-class InspectorCanvasAgent : public InspectorAgentBase, public Inspector::InspectorCanvasBackendDispatcherHandler {
-public:
-    InspectorCanvasAgent(InstrumentingAgents*, InspectorPageAgent*, Inspector::InjectedScriptManager*);
-    ~InspectorCanvasAgent();
-
-    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
-
-    void frameNavigated(Frame*);
-    void frameDetached(Frame*);
-    void didBeginFrame();
-
-    // Called from InspectorCanvasInstrumentation.
-    Deprecated::ScriptObject wrapCanvas2DRenderingContextForInstrumentation(const Deprecated::ScriptObject&);
-#if ENABLE(WEBGL)
-    Deprecated::ScriptObject wrapWebGLRenderingContextForInstrumentation(const Deprecated::ScriptObject&);
-#endif
-
-    // Called from the front-end.
-    virtual void enable(ErrorString*) override;
-    virtual void disable(ErrorString*) override;
-    virtual void dropTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&) override;
-    virtual void hasUninstrumentedCanvases(ErrorString*, bool*) override;
-    virtual void captureFrame(ErrorString*, const Inspector::TypeBuilder::Network::FrameId*, Inspector::TypeBuilder::Canvas::TraceLogId*) override;
-    virtual void startCapturing(ErrorString*, const Inspector::TypeBuilder::Network::FrameId*, Inspector::TypeBuilder::Canvas::TraceLogId*) override;
-    virtual void stopCapturing(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&) override;
-    virtual void getTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, const int*, const int*, RefPtr<Inspector::TypeBuilder::Canvas::TraceLog>&) override;
-    virtual void replayTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, int, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>&) override;
-    virtual void getResourceInfo(ErrorString*, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceInfo>&) override;
-    virtual void getResourceState(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>&) override;
-
-private:
-    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, JSC::ExecState*);
-    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const Deprecated::ScriptObject&);
-    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const String&);
-
-    void findFramesWithUninstrumentedCanvases();
-    bool checkIsEnabled(ErrorString*) const;
-    Deprecated::ScriptObject notifyRenderingContextWasWrapped(const Deprecated::ScriptObject&);
-
-    InspectorPageAgent* m_pageAgent;
-    Inspector::InjectedScriptManager* m_injectedScriptManager;
-    std::unique_ptr<Inspector::InspectorCanvasFrontendDispatcher> m_frontendDispatcher;
-    RefPtr<Inspector::InspectorCanvasBackendDispatcher> m_backendDispatcher;
-    bool m_enabled;
-    // Contains all frames with canvases, value is true only for frames that have an uninstrumented canvas.
-    typedef HashMap<Frame*, bool> FramesWithUninstrumentedCanvases;
-    FramesWithUninstrumentedCanvases m_framesWithUninstrumentedCanvases;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
-
-#endif // !defined(InspectorCanvasAgent_h)
diff --git a/Source/WebCore/inspector/InspectorCanvasInstrumentation.h b/Source/WebCore/inspector/InspectorCanvasInstrumentation.h
deleted file mode 100644 (file)
index 0150c92..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InspectorCanvasInstrumentation_h
-#define InspectorCanvasInstrumentation_h
-
-#include "InspectorCanvasAgent.h"
-#include "InspectorInstrumentation.h"
-#include "InstrumentingAgents.h"
-#include <bindings/ScriptObject.h>
-
-namespace WebCore {
-
-Deprecated::ScriptObject InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation(Document* document, const Deprecated::ScriptObject& context)
-{
-#if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document)) {
-        if (InspectorCanvasAgent* canvasAgent = instrumentingAgents->inspectorCanvasAgent())
-            return canvasAgent->wrapCanvas2DRenderingContextForInstrumentation(context);
-    }
-#else
-    UNUSED_PARAM(document);
-    UNUSED_PARAM(context);
-#endif
-    return Deprecated::ScriptObject();
-}
-
-#if ENABLE(WEBGL)
-Deprecated::ScriptObject InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation(Document* document, const Deprecated::ScriptObject& glContext)
-{
-#if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document)) {
-        if (InspectorCanvasAgent* canvasAgent = instrumentingAgents->inspectorCanvasAgent())
-            return canvasAgent->wrapWebGLRenderingContextForInstrumentation(glContext);
-    }
-#else
-    UNUSED_PARAM(document);
-    UNUSED_PARAM(glContext);
-#endif
-    return Deprecated::ScriptObject();
-}
-#endif // ENABLE(WEBGL)
-
-} // namespace WebCore
-
-#endif // !defined(InspectorCanvasInstrumentation_h)
index 835ff4c93050d5940e16953642d94e2b4f2dd85f..a42ec154c9f3b8367ae011af3890aa68894fee74 100644 (file)
@@ -38,7 +38,6 @@
 #include "GraphicsContext.h"
 #include "InspectorApplicationCacheAgent.h"
 #include "InspectorCSSAgent.h"
-#include "InspectorCanvasAgent.h"
 #include "InspectorClient.h"
 #include "InspectorDOMAgent.h"
 #include "InspectorDOMDebuggerAgent.h"
@@ -162,8 +161,6 @@ InspectorController::InspectorController(Page& page, InspectorClient* inspectorC
 
     m_agents.append(std::make_unique<InspectorWorkerAgent>(m_instrumentingAgents.get()));
 
-    m_agents.append(std::make_unique<InspectorCanvasAgent>(m_instrumentingAgents.get(), pageAgent, m_injectedScriptManager.get()));
-
     m_agents.append(std::make_unique<InspectorInputAgent>(m_instrumentingAgents.get(), &page));
 
     m_agents.append(std::make_unique<InspectorLayerTreeAgent>(m_instrumentingAgents.get()));
@@ -416,8 +413,6 @@ void InspectorController::didBeginFrame()
 {
     if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspectorTimelineAgent())
         timelineAgent->didBeginFrame();
-    if (InspectorCanvasAgent* canvasAgent = m_instrumentingAgents->inspectorCanvasAgent())
-        canvasAgent->didBeginFrame();
 }
 
 void InspectorController::didCancelFrame()
index 30512ab3b5de44c1d3fca577853b2efa05f20d3e..e7476e8b325ca84a641d496c7709c20565385b38 100644 (file)
@@ -43,7 +43,6 @@
 #include "EventDispatcher.h"
 #include "InspectorApplicationCacheAgent.h"
 #include "InspectorCSSAgent.h"
-#include "InspectorCanvasAgent.h"
 #include "InspectorDOMAgent.h"
 #include "InspectorDOMDebuggerAgent.h"
 #include "InspectorDOMStorageAgent.h"
@@ -739,8 +738,6 @@ void InspectorInstrumentation::loadEventFiredImpl(InstrumentingAgents* instrumen
 
 void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
 {
-    if (InspectorCanvasAgent* canvasAgent = instrumentingAgents->inspectorCanvasAgent())
-        canvasAgent->frameDetached(frame);
     if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
         pageAgent->frameDetached(frame);
 }
@@ -773,8 +770,6 @@ void InspectorInstrumentation::didCommitLoadImpl(InstrumentingAgents* instrument
     }
     if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent())
         domAgent->didCommitLoad(loader->frame()->document());
-    if (InspectorCanvasAgent* canvasAgent = instrumentingAgents->inspectorCanvasAgent())
-        canvasAgent->frameNavigated(loader->frame());
     if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
         pageAgent->frameNavigated(loader);
 }
@@ -1062,12 +1057,6 @@ void InspectorInstrumentation::updateApplicationCacheStatusImpl(InstrumentingAge
         applicationCacheAgent->updateApplicationCacheStatus(frame);
 }
 
-bool InspectorInstrumentation::canvasAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
-{
-    InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
-    return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent();
-}
-
 bool InspectorInstrumentation::consoleAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
 {
     InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
index ddff892ee5cab1cd6369d0d5d546b283b76575a5..b5f63d1ce42ed6c2dde12593d0c624e3ae14b614 100644 (file)
@@ -261,12 +261,10 @@ public:
     static void frontendCreated() { s_frontendCounter += 1; }
     static void frontendDeleted() { s_frontendCounter -= 1; }
     static bool hasFrontends() { return s_frontendCounter; }
-    static bool canvasAgentEnabled(ScriptExecutionContext*);
     static bool consoleAgentEnabled(ScriptExecutionContext*);
     static bool timelineAgentEnabled(ScriptExecutionContext*);
 #else
     static bool hasFrontends() { return false; }
-    static bool canvasAgentEnabled(ScriptExecutionContext*) { return false; }
     static bool consoleAgentEnabled(ScriptExecutionContext*) { return false; }
     static bool runtimeAgentEnabled(Frame*) { return false; }
     static bool timelineAgentEnabled(ScriptExecutionContext*) { return false; }
index b22c7b5712f562370972b827776a342b21752b09..9cb4cf6550fb3bb8f1dead3bc12e441f4a7f39f7 100644 (file)
@@ -65,7 +65,6 @@ InstrumentingAgents::InstrumentingAgents(InspectorEnvironment& environment)
     , m_inspectorDOMDebuggerAgent(nullptr)
     , m_inspectorProfilerAgent(nullptr)
     , m_inspectorWorkerAgent(nullptr)
-    , m_inspectorCanvasAgent(nullptr)
 {
 }
 
@@ -91,7 +90,6 @@ void InstrumentingAgents::reset()
     m_inspectorDOMDebuggerAgent = nullptr;
     m_inspectorProfilerAgent = nullptr;
     m_inspectorWorkerAgent = nullptr;
-    m_inspectorCanvasAgent = nullptr;
 }
 
 InstrumentingAgents* instrumentationForPage(Page* page)
index 37fab15049c9de6284adba2577a3316e55af0421..828cce0ba510cb0365a09a7d26993eaaeaf48769 100644 (file)
@@ -46,7 +46,6 @@ namespace WebCore {
 
 class InspectorApplicationCacheAgent;
 class InspectorCSSAgent;
-class InspectorCanvasAgent;
 class InspectorDOMAgent;
 class InspectorDOMDebuggerAgent;
 class InspectorDOMStorageAgent;
@@ -134,9 +133,6 @@ public:
     InspectorWorkerAgent* inspectorWorkerAgent() const { return m_inspectorWorkerAgent; }
     void setInspectorWorkerAgent(InspectorWorkerAgent* agent) { m_inspectorWorkerAgent = agent; }
 
-    InspectorCanvasAgent* inspectorCanvasAgent() const { return m_inspectorCanvasAgent; }
-    void setInspectorCanvasAgent(InspectorCanvasAgent* agent) { m_inspectorCanvasAgent = agent; }
-
     InspectorLayerTreeAgent* inspectorLayerTreeAgent() const { return m_inspectorLayerTreeAgent; }
     void setInspectorLayerTreeAgent(InspectorLayerTreeAgent* agent) { m_inspectorLayerTreeAgent = agent; }
 
@@ -166,7 +162,6 @@ private:
     InspectorProfilerAgent* m_inspectorProfilerAgent;
     InspectorHeapProfilerAgent* m_inspectorHeapProfilerAgent;
     InspectorWorkerAgent* m_inspectorWorkerAgent;
-    InspectorCanvasAgent* m_inspectorCanvasAgent;
 };
 
 InstrumentingAgents* instrumentationForPage(Page*);