Changeset 74785 in webkit
- Timestamp:
- Dec 29, 2010 11:41:53 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 deleted
- 15 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/inspector/report-protocol-errors-expected.txt
r74761 r74785 45 45 { 46 46 seq : 2 47 domain : " Resources"47 domain : "Network" 48 48 success : false 49 49 errors : { … … 53 53 { 54 54 seq : 3 55 domain : " Resources"55 domain : "Network" 56 56 success : false 57 57 errors : { … … 61 61 { 62 62 seq : 4 63 domain : " Resources"63 domain : "Network" 64 64 success : false 65 65 errors : { … … 71 71 { 72 72 seq : 5 73 domain : " Resources"73 domain : "Network" 74 74 success : false 75 75 errors : { -
trunk/WebCore/CMakeLists.txt
r74761 r74785 1154 1154 inspector/InjectedScriptHost.cpp 1155 1155 inspector/InspectorApplicationCacheAgent.cpp 1156 inspector/InspectorBackend.cpp1157 1156 inspector/InspectorCSSAgent.cpp 1158 1157 inspector/InspectorClient.cpp 1159 1158 inspector/InspectorController.cpp 1160 1159 inspector/InspectorDOMAgent.cpp 1160 inspector/InspectorDOMStorageAgent.cpp 1161 1161 inspector/InspectorDOMStorageResource.cpp 1162 inspector/InspectorDatabaseAgent.cpp 1162 1163 inspector/InspectorDatabaseResource.cpp 1163 1164 inspector/InspectorDebuggerAgent.cpp … … 1171 1172 inspector/InspectorValues.cpp 1172 1173 inspector/InspectorState.cpp 1173 inspector/InspectorStorageAgent.cpp1174 1174 inspector/InspectorTimelineAgent.cpp 1175 1175 inspector/ScriptArguments.cpp -
trunk/WebCore/ChangeLog
r74783 r74785 1 2010-12-29 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: extract Database & DOM Storage agents; remove InspectorBackend. 6 https://bugs.webkit.org/show_bug.cgi?id=51707 7 8 This change brushes up storage agents + removes redundant InspectorBackend class. 9 10 * CMakeLists.txt: 11 * GNUmakefile.am: 12 * WebCore.gypi: 13 * WebCore.pro: 14 * WebCore.vcproj/WebCore.vcproj: 15 * WebCore.xcodeproj/project.pbxproj: 16 * inspector/CodeGeneratorInspector.pm: 17 * inspector/InjectedScriptHost.cpp: 18 (WebCore::InjectedScriptHost::databaseForId): 19 (WebCore::InjectedScriptHost::selectDatabase): 20 (WebCore::InjectedScriptHost::selectDOMStorage): 21 (WebCore::InjectedScriptHost::inspectorDOMAgent): 22 * inspector/Inspector.idl: 23 * inspector/InspectorBackend.cpp: Removed. 24 * inspector/InspectorBackend.h: Removed. 25 * inspector/InspectorController.cpp: 26 (WebCore::InspectorController::InspectorController): 27 (WebCore::InspectorController::~InspectorController): 28 (WebCore::InspectorController::connectFrontend): 29 (WebCore::InspectorController::releaseFrontendLifetimeAgents): 30 (WebCore::InspectorController::didUseDOMStorage): 31 (WebCore::InspectorController::setInjectedScriptSource): 32 (WebCore::InspectorController::dispatchOnInjectedScript): 33 (WebCore::InspectorController::releaseWrapperObjectGroup): 34 * inspector/InspectorController.h: 35 * inspector/InspectorDOMStorageAgent.cpp: Added. 36 (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent): 37 (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): 38 (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): 39 (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): 40 (WebCore::InspectorDOMStorageAgent::selectDOMStorage): 41 (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): 42 (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId): 43 * inspector/InspectorDOMStorageAgent.h: Copied from WebCore/inspector/InspectorStorageAgent.h. 44 (WebCore::InspectorDOMStorageAgent::create): 45 (WebCore::InspectorDOMStorageAgent::frontend): 46 * inspector/InspectorDatabaseAgent.cpp: Renamed from WebCore/inspector/InspectorStorageAgent.cpp. 47 (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent): 48 (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): 49 (WebCore::InspectorDatabaseAgent::executeSQL): 50 (WebCore::InspectorDatabaseAgent::databaseForId): 51 (WebCore::InspectorDatabaseAgent::selectDatabase): 52 (WebCore::InspectorDatabaseAgent::clearFrontend): 53 (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): 54 * inspector/InspectorDatabaseAgent.h: Renamed from WebCore/inspector/InspectorStorageAgent.h. 55 (WebCore::InspectorDatabaseAgent::create): 56 (WebCore::InspectorDatabaseAgent::frontend): 57 * inspector/front-end/ScriptsPanel.js: 58 (WebInspector.ScriptsPanel.prototype.show): 59 (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown): 60 (WebInspector.ScriptsPanel.prototype._toggleDebugging): 61 1 62 2010-12-29 Dirk Schulze <krit@webkit.org> 2 63 -
trunk/WebCore/GNUmakefile.am
r74766 r74785 1931 1931 WebCore/inspector/InspectorApplicationCacheAgent.cpp \ 1932 1932 WebCore/inspector/InspectorApplicationCacheAgent.h \ 1933 WebCore/inspector/InspectorBackend.cpp \1934 WebCore/inspector/InspectorBackend.h \1935 1933 WebCore/inspector/InspectorClient.cpp \ 1936 1934 WebCore/inspector/InspectorClient.h \ … … 1939 1937 WebCore/inspector/InspectorCSSAgent.cpp \ 1940 1938 WebCore/inspector/InspectorCSSAgent.h \ 1939 WebCore/inspector/InspectorDatabaseAgent.cpp \ 1940 WebCore/inspector/InspectorDatabaseAgent.h \ 1941 1941 WebCore/inspector/InspectorDatabaseResource.cpp \ 1942 1942 WebCore/inspector/InspectorDatabaseResource.h \ … … 1945 1945 WebCore/inspector/InspectorDOMAgent.cpp \ 1946 1946 WebCore/inspector/InspectorDOMAgent.h \ 1947 WebCore/inspector/InspectorDOMStorageAgent.cpp \ 1948 WebCore/inspector/InspectorDOMStorageAgent.h \ 1947 1949 WebCore/inspector/InspectorDOMStorageResource.cpp \ 1948 1950 WebCore/inspector/InspectorDOMStorageResource.h \ … … 1962 1964 WebCore/inspector/InspectorState.cpp \ 1963 1965 WebCore/inspector/InspectorState.h \ 1964 WebCore/inspector/InspectorStorageAgent.cpp \1965 WebCore/inspector/InspectorStorageAgent.h \1966 1966 WebCore/inspector/InspectorStyleSheet.cpp \ 1967 1967 WebCore/inspector/InspectorStyleSheet.h \ -
trunk/WebCore/WebCore.gypi
r74761 r74785 2000 2000 'inspector/InspectorApplicationCacheAgent.cpp', 2001 2001 'inspector/InspectorApplicationCacheAgent.h', 2002 'inspector/InspectorBackend.cpp',2003 'inspector/InspectorBackend.h',2004 2002 'inspector/InspectorClient.cpp', 2005 2003 'inspector/InspectorClient.h', … … 2008 2006 'inspector/InspectorCSSAgent.cpp', 2009 2007 'inspector/InspectorCSSAgent.h', 2008 'inspector/InspectorDatabaseAgent.cpp', 2009 'inspector/InspectorDatabaseAgent.h', 2010 2010 'inspector/InspectorDatabaseResource.cpp', 2011 2011 'inspector/InspectorDatabaseResource.h', … … 2014 2014 'inspector/InspectorDOMAgent.cpp', 2015 2015 'inspector/InspectorDOMAgent.h', 2016 'inspector/InspectorDOMStorageAgent.cpp', 2017 'inspector/InspectorDOMStorageAgent.h', 2016 2018 'inspector/InspectorDOMStorageResource.cpp', 2017 2019 'inspector/InspectorDOMStorageResource.h', … … 2029 2031 'inspector/InspectorState.cpp', 2030 2032 'inspector/InspectorState.h', 2031 'inspector/InspectorStorageAgent.cpp',2032 'inspector/InspectorStorageAgent.h',2033 2033 'inspector/InspectorStyleSheet.cpp', 2034 2034 'inspector/InspectorStyleSheet.h', -
trunk/WebCore/WebCore.pro
r74761 r74785 1040 1040 inspector/InjectedScriptHost.cpp \ 1041 1041 inspector/InspectorApplicationCacheAgent.cpp \ 1042 inspector/InspectorBackend.cpp \1043 1042 inspector/InspectorCSSAgent.cpp \ 1044 1043 inspector/InspectorClient.cpp \ 1045 1044 inspector/InspectorController.cpp \ 1045 inspector/InspectorDatabaseAgent.cpp \ 1046 1046 inspector/InspectorDatabaseResource.cpp \ 1047 1047 inspector/InspectorDebuggerAgent.cpp \ 1048 1048 inspector/InspectorDOMAgent.cpp \ 1049 inspector/InspectorDOMStorageAgent.cpp \ 1049 1050 inspector/InspectorDOMStorageResource.cpp \ 1050 1051 inspector/InspectorFileSystemAgent.cpp \ … … 1055 1056 inspector/InspectorResourceAgent.cpp \ 1056 1057 inspector/InspectorState.cpp \ 1057 inspector/InspectorStorageAgent.cpp \1058 1058 inspector/InspectorStyleSheet.cpp \ 1059 1059 inspector/InspectorTimelineAgent.cpp \ … … 1931 1931 inspector/InjectedScriptHost.h \ 1932 1932 inspector/InspectorApplicationCacheAgent.h \ 1933 inspector/InspectorBackend.h \1934 1933 inspector/InspectorController.h \ 1935 1934 inspector/InspectorCSSAgent.h \ 1935 inspector/InspectorDatabaseAgent.h \ 1936 1936 inspector/InspectorDatabaseResource.h \ 1937 1937 inspector/InspectorDebuggerAgent.h \ 1938 inspector/InspectorDOMStorageAgent.h \ 1938 1939 inspector/InspectorDOMStorageResource.h \ 1939 1940 inspector/InspectorFileSystemAgent.h \ … … 1945 1946 inspector/InspectorResourceAgent.h \ 1946 1947 inspector/InspectorState.h \ 1947 inspector/InspectorStorageAgent.h \1948 1948 inspector/InspectorStyleSheet.h \ 1949 1949 inspector/InspectorTimelineAgent.h \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r74761 r74785 65095 65095 </File> 65096 65096 <File 65097 RelativePath="..\inspector\InspectorBackend.cpp"65098 >65099 </File>65100 <File65101 RelativePath="..\inspector\InspectorBackend.h"65102 >65103 </File>65104 <File65105 65097 RelativePath="..\inspector\InspectorClient.cpp" 65106 65098 > … … 65127 65119 </File> 65128 65120 <File 65121 RelativePath="..\inspector\InspectorDatabaseAgent.cpp" 65122 > 65123 </File> 65124 <File 65125 RelativePath="..\inspector\InspectorDatabaseAgent.h" 65126 > 65127 </File> 65128 <File 65129 65129 RelativePath="..\inspector\InspectorDatabaseResource.cpp" 65130 65130 > … … 65151 65151 </File> 65152 65152 <File 65153 RelativePath="..\inspector\InspectorDOMStorageAgent.cpp" 65154 > 65155 </File> 65156 <File 65157 RelativePath="..\inspector\InspectorDOMStorageAgent.h" 65158 > 65159 </File> 65160 <File 65153 65161 RelativePath="..\inspector\InspectorDOMStorageResource.cpp" 65154 65162 > … … 65216 65224 <File 65217 65225 RelativePath="..\inspector\InspectorState.h" 65218 >65219 </File>65220 <File65221 RelativePath="..\inspector\InspectorStorageAgent.cpp"65222 >65223 </File>65224 <File65225 RelativePath="..\inspector\InspectorStorageAgent.h"65226 65226 > 65227 65227 </File> -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r74764 r74785 1605 1605 7A674BDB0F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */; }; 1606 1606 7A674BDC0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */; }; 1607 7A74ECBA101839A600BF939E /* Inspector Backend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorBackend.cpp */; };1608 7A74ECBB101839A600BF939E /* Inspector Backend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A74ECB9101839A600BF939E /* InspectorBackend.h */; };1607 7A74ECBA101839A600BF939E /* InspectorDOMStorageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */; }; 1608 7A74ECBB101839A600BF939E /* InspectorDOMStorageAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A74ECB9101839A600BF939E /* InspectorDOMStorageAgent.h */; }; 1609 1609 7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */; }; 1610 7AB0B1C01211A62200A76940 /* Inspector StorageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AB0B1BE1211A62200A76940 /* InspectorStorageAgent.cpp */; };1611 7AB0B1C11211A62200A76940 /* Inspector StorageAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AB0B1BF1211A62200A76940 /* InspectorStorageAgent.h */; };1610 7AB0B1C01211A62200A76940 /* InspectorDatabaseAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */; }; 1611 7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */; }; 1612 1612 7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */; }; 1613 1613 7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 7991 7991 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroupLoadDeferrer.cpp; sourceTree = "<group>"; }; 7992 7992 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageGroupLoadDeferrer.h; sourceTree = "<group>"; }; 7993 7A74ECB8101839A500BF939E /* Inspector Backend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackend.cpp; sourceTree = "<group>"; };7994 7A74ECB9101839A600BF939E /* Inspector Backend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorBackend.h; sourceTree = "<group>"; };7993 7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDOMStorageAgent.cpp; sourceTree = "<group>"; }; 7994 7A74ECB9101839A600BF939E /* InspectorDOMStorageAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMStorageAgent.h; sourceTree = "<group>"; }; 7995 7995 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorFrontendHostCustom.cpp; sourceTree = "<group>"; }; 7996 7AB0B1BE1211A62200A76940 /* Inspector StorageAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorStorageAgent.cpp; sourceTree = "<group>"; };7997 7AB0B1BF1211A62200A76940 /* Inspector StorageAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorStorageAgent.h; sourceTree = "<group>"; };7996 7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDatabaseAgent.cpp; sourceTree = "<group>"; }; 7997 7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDatabaseAgent.h; sourceTree = "<group>"; }; 7998 7998 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuProvider.h; sourceTree = "<group>"; }; 7999 7999 7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptBreakpoint.h; sourceTree = "<group>"; }; … … 12803 12803 B885E8D211E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp */, 12804 12804 B885E8D311E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h */, 12805 7A74ECB8101839A500BF939E /* InspectorBackend.cpp */,12806 7A74ECB9101839A600BF939E /* InspectorBackend.h */,12807 12805 7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */, 12808 12806 1C81B9580E97330800266E07 /* InspectorClient.h */, … … 12811 12809 82AB1741124B99EC00C5069D /* InspectorCSSAgent.cpp */, 12812 12810 82AB1742124B99EC00C5069D /* InspectorCSSAgent.h */, 12811 7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */, 12812 7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */, 12813 12813 41F062130F5F192600A07EAC /* InspectorDatabaseResource.cpp */, 12814 12814 41F062120F5F192600A07EAC /* InspectorDatabaseResource.h */, … … 12817 12817 7A2458791021EAF4000A00AA /* InspectorDOMAgent.cpp */, 12818 12818 7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */, 12819 7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */, 12820 7A74ECB9101839A600BF939E /* InspectorDOMStorageAgent.h */, 12819 12821 41F061730F5F00AC00A07EAC /* InspectorDOMStorageResource.cpp */, 12820 12822 41F061720F5F00AC00A07EAC /* InspectorDOMStorageResource.h */, … … 12835 12837 4FA3B908125CD12100300BAD /* InspectorState.cpp */, 12836 12838 4FA3B909125CD12200300BAD /* InspectorState.h */, 12837 7AB0B1BE1211A62200A76940 /* InspectorStorageAgent.cpp */,12838 7AB0B1BF1211A62200A76940 /* InspectorStorageAgent.h */,12839 12839 82AB176F125C826700C5069D /* InspectorStyleSheet.cpp */, 12840 12840 82AB1770125C826700C5069D /* InspectorStyleSheet.h */, … … 20713 20713 93309DF2099E64920056E581 /* InsertTextCommand.h in Headers */, 20714 20714 B885E8D511E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h in Headers */, 20715 7A74ECBB101839A600BF939E /* InspectorBackend.h in Headers */,20716 20715 4F707A9A11EF679400ACDA69 /* InspectorBackendDispatcher.h in Headers */, 20717 20716 1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */, 20718 20717 1C81B95A0E97330800266E07 /* InspectorController.h in Headers */, 20719 20718 82AB1744124B99EC00C5069D /* InspectorCSSAgent.h in Headers */, 20719 7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */, 20720 20720 41F062140F5F192600A07EAC /* InspectorDatabaseResource.h in Headers */, 20721 20721 F33F053E120B0DA500E5743A /* InspectorDebuggerAgent.h in Headers */, 20722 20722 7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */, 20723 7A74ECBB101839A600BF939E /* InspectorDOMStorageAgent.h in Headers */, 20723 20724 41F061740F5F00AC00A07EAC /* InspectorDOMStorageResource.h in Headers */, 20724 20725 3888F6EF128C9889000CA8E0 /* InspectorFileSystemAgent.h in Headers */, … … 20730 20731 82AB1776125C826700C5069D /* InspectorResourceAgent.h in Headers */, 20731 20732 4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */, 20732 7AB0B1C11211A62200A76940 /* InspectorStorageAgent.h in Headers */,20733 20733 82AB1774125C826700C5069D /* InspectorStyleSheet.h in Headers */, 20734 20734 754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */, … … 23430 23430 93309DF1099E64920056E581 /* InsertTextCommand.cpp in Sources */, 23431 23431 B885E8D411E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp in Sources */, 23432 7A74ECBA101839A600BF939E /* InspectorBackend.cpp in Sources */,23433 23432 4F707A9911EF679400ACDA69 /* InspectorBackendDispatcher.cpp in Sources */, 23434 23433 7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */, 23435 23434 1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */, 23436 23435 82AB1743124B99EC00C5069D /* InspectorCSSAgent.cpp in Sources */, 23436 7AB0B1C01211A62200A76940 /* InspectorDatabaseAgent.cpp in Sources */, 23437 23437 41F062150F5F192600A07EAC /* InspectorDatabaseResource.cpp in Sources */, 23438 23438 F33F053D120B0DA500E5743A /* InspectorDebuggerAgent.cpp in Sources */, 23439 23439 7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */, 23440 7A74ECBA101839A600BF939E /* InspectorDOMStorageAgent.cpp in Sources */, 23440 23441 41F061750F5F00AC00A07EAC /* InspectorDOMStorageResource.cpp in Sources */, 23441 23442 3888F6EE128C9889000CA8E0 /* InspectorFileSystemAgent.cpp in Sources */, … … 23447 23448 82AB1775125C826700C5069D /* InspectorResourceAgent.cpp in Sources */, 23448 23449 4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */, 23449 7AB0B1C01211A62200A76940 /* InspectorStorageAgent.cpp in Sources */,23450 23450 82AB1773125C826700C5069D /* InspectorStyleSheet.cpp in Sources */, 23451 23451 754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */, -
trunk/WebCore/inspector/CodeGeneratorInspector.pm
r74761 r74785 11 11 12 12 my %typeTransform; 13 $typeTransform{"InspectorClient"} = { 14 "forward" => "InspectorClient", 15 "header" => "InspectorClient.h", 16 }; 17 $typeTransform{"Backend"} = { 18 "forward" => "InspectorBackend", 19 "header" => "InspectorBackend.h", 20 "domainAccessor" => "m_inspectorController->inspectorBackend()", 13 $typeTransform{"ApplicationCache"} = { 14 "forward" => "InspectorApplicationCacheAgent", 15 "header" => "InspectorApplicationCacheAgent.h", 16 "domainAccessor" => "m_inspectorController->m_applicationCacheAgent", 17 }; 18 $typeTransform{"CSS"} = { 19 "forward" => "InspectorCSSAgent", 20 "header" => "InspectorCSSAgent.h", 21 "domainAccessor" => "m_inspectorController->m_cssAgent", 22 }; 23 $typeTransform{"Debugger"} = { 24 "forward" => "InspectorDebuggerAgent", 25 "header" => "InspectorDebuggerAgent.h", 26 "domainAccessor" => "m_inspectorController->m_debuggerAgent", 27 }; 28 $typeTransform{"Database"} = { 29 "forward" => "InspectorDatabaseAgent", 30 "header" => "InspectorDatabaseAgent.h", 31 "domainAccessor" => "m_inspectorController->m_databaseAgent", 32 }; 33 $typeTransform{"DOM"} = { 34 "forward" => "InspectorDOMAgent", 35 "header" => "InspectorDOMAgent.h", 36 "domainAccessor" => "m_inspectorController->m_domAgent", 37 }; 38 $typeTransform{"DOMStorage"} = { 39 "forward" => "InspectorDOMStorageAgent", 40 "header" => "InspectorDOMStorageAgent.h", 41 "domainAccessor" => "m_inspectorController->m_domStorageAgent", 42 }; 43 $typeTransform{"FileSystem"} = { 44 "forward" => "InspectorFileSystemAgent", 45 "header" => "InspectorFileSystemAgent.h", 46 "domainAccessor" => "m_inspectorController->m_fileSystemAgent", 21 47 }; 22 48 $typeTransform{"Inspector"} = { 23 49 "forwardHeader" => "InspectorController.h", 24 50 "domainAccessor" => "m_inspectorController", 25 };26 $typeTransform{"Debugger"} = {27 "forward" => "InspectorDebuggerAgent",28 "header" => "InspectorDebuggerAgent.h",29 "domainAccessor" => "m_inspectorController->debuggerAgent()",30 };31 $typeTransform{"Resources"} = {32 "forward" => "InspectorResourceAgent",33 "header" => "InspectorResourceAgent.h",34 "domainAccessor" => "m_inspectorController->m_resourceAgent",35 51 }; 36 52 $typeTransform{"Network"} = { … … 39 55 "domainAccessor" => "m_inspectorController->m_resourceAgent", 40 56 }; 41 $typeTransform{"DOMStorage"} = {42 "forwardHeader" => "InspectorController.h",43 "domainAccessor" => "m_inspectorController",44 };45 $typeTransform{"Database"} = {46 "forward" => "InspectorBackend",47 "header" => "InspectorBackend.h",48 "domainAccessor" => "m_inspectorController->inspectorBackend()",49 };50 $typeTransform{"DOM"} = {51 "forward" => "InspectorDOMAgent",52 "header" => "InspectorDOMAgent.h",53 "domainAccessor" => "m_inspectorController->domAgent()",54 };55 $typeTransform{"CSS"} = {56 "forward" => "InspectorCSSAgent",57 "header" => "InspectorCSSAgent.h",58 "domainAccessor" => "m_inspectorController->cssAgent()",59 };60 $typeTransform{"ApplicationCache"} = {61 "forward" => "InspectorApplicationCacheAgent",62 "header" => "InspectorApplicationCacheAgent.h",63 "domainAccessor" => "m_inspectorController->applicationCacheAgent()",64 };65 $typeTransform{"FileSystem"} = {66 "forward" => "InspectorFileSystemAgent",67 "header" => "InspectorFileSystemAgent.h",68 "domainAccessor" => "m_inspectorController->fileSystemAgent()",69 };70 57 $typeTransform{"Profiler"} = { 71 58 "forward" => "InspectorProfilerAgent", 72 59 "header" => "InspectorProfilerAgent.h", 73 "domainAccessor" => "m_inspectorController->profilerAgent()", 74 }; 60 "domainAccessor" => "m_inspectorController->m_profilerAgent", 61 }; 62 75 63 $typeTransform{"Frontend"} = { 76 64 "forward" => "InspectorFrontend", 77 65 "header" => "InspectorFrontend.h", 66 }; 67 $typeTransform{"InspectorClient"} = { 68 "forward" => "InspectorClient", 69 "header" => "InspectorClient.h", 78 70 }; 79 71 $typeTransform{"PassRefPtr"} = { -
trunk/WebCore/inspector/InjectedScriptHost.cpp
r74761 r74785 31 31 #include "config.h" 32 32 #include "InjectedScriptHost.h" 33 #include "InspectorDatabaseAgent.h" 34 #include "InspectorDOMStorageAgent.h" 33 35 34 36 #if ENABLE(INSPECTOR) … … 121 123 Database* InjectedScriptHost::databaseForId(long databaseId) 122 124 { 123 if (m_inspectorController )124 return m_inspectorController-> databaseForId(databaseId);125 if (m_inspectorController && m_inspectorController->m_databaseAgent) 126 return m_inspectorController->m_databaseAgent->databaseForId(databaseId); 125 127 return 0; 126 128 } … … 128 130 void InjectedScriptHost::selectDatabase(Database* database) 129 131 { 130 if (m_inspectorController )131 m_inspectorController-> selectDatabase(database);132 if (m_inspectorController && m_inspectorController->m_databaseAgent) 133 m_inspectorController->m_databaseAgent->selectDatabase(database); 132 134 } 133 135 #endif … … 136 138 void InjectedScriptHost::selectDOMStorage(Storage* storage) 137 139 { 138 if (m_inspectorController )139 m_inspectorController-> selectDOMStorage(storage);140 if (m_inspectorController && m_inspectorController->m_domStorageAgent) 141 m_inspectorController->m_domStorageAgent->selectDOMStorage(storage); 140 142 } 141 143 #endif … … 171 173 if (!m_inspectorController) 172 174 return 0; 173 return m_inspectorController-> domAgent();175 return m_inspectorController->m_domAgent.get(); 174 176 } 175 177 -
trunk/WebCore/inspector/Inspector.idl
r74761 r74785 37 37 /////////////////////////////////////////////////////////////////////// 38 38 39 [domain=Backend] void setInjectedScriptSource(in String scriptSource);40 39 // HUGE FIXME: we need to expose InjectedScript methods here. Or document InjectedScript capabilities. 41 [domain=Backend] void dispatchOnInjectedScript(in long injectedScriptId, in String methodName, in String arguments, out Value result, out boolean isException); 40 [domain=Inspector] void setInjectedScriptSource(in String scriptSource); 41 [domain=Inspector] void dispatchOnInjectedScript(in long injectedScriptId, in String methodName, in String arguments, out Value result, out boolean isException); 42 42 [domain=Inspector] void addScriptToEvaluateOnLoad(in String scriptSource); 43 43 [domain=Inspector] void removeAllScriptsToEvaluateOnLoad(); 44 [domain= Backend] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);44 [domain=Inspector] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup); 45 45 [domain=Inspector] void getInspectorState(out Object state); 46 46 [domain=Inspector] void setMonitoringXHREnabled(in boolean enable, out boolean newState); … … 70 70 [domain=Inspector] void setExtraHeaders(in Object headers); 71 71 72 [domain=Inspector] void getCookies(out Array cookies, out String cookiesString); 73 [domain=Inspector] void deleteCookie(in String cookieName, in String domain); 74 72 75 /////////////////////////////////////////////////////////////////////// 73 76 // Console API … … 84 87 // Network API 85 88 /////////////////////////////////////////////////////////////////////// 89 90 [domain=Network] void cachedResources(out Object resources); 91 [domain=Network] void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out String content); 92 [notify, domain=Network] void frameDetachedFromParent(out unsigned long frameId); 86 93 87 94 [notify, domain=Network] void identifierForInitialRequest(out long identifier, out String url, out Object loader, out Value callStack); … … 100 107 [notify, domain=Network] void didCloseWebSocket(out unsigned long identifier, out double time); 101 108 102 ///////////////////////////////////////////////////////////////////////103 // Resources API104 ///////////////////////////////////////////////////////////////////////105 106 [domain=Resources] void cachedResources(out Object resources);107 [domain=Resources] void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out String content);108 [notify, domain=Resources] void frameDetachedFromParent(out unsigned long frameId);109 110 // FIXME: Introduce new StorageDomain.111 [domain=Inspector] void getCookies(out Array cookies, out String cookiesString);112 [domain=Inspector] void deleteCookie(in String cookieName, in String domain);113 109 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE 110 111 /////////////////////////////////////////////////////////////////////// 112 // Database API 113 /////////////////////////////////////////////////////////////////////// 114 114 115 [notify, domain=Database] void addDatabase(out Object database); 115 116 [notify, domain=Database] void selectDatabase(out int databaseId); … … 119 120 [notify, domain=Database] void sqlTransactionFailed(out long transactionId, out Value sqlError); 120 121 #endif 122 121 123 #if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE 124 125 /////////////////////////////////////////////////////////////////////// 126 // DOM Storage API 127 /////////////////////////////////////////////////////////////////////// 128 122 129 [domain=DOMStorage] void getDOMStorageEntries(in long storageId, out Array entries); 123 130 [domain=DOMStorage] void setDOMStorageItem(in long storageId, in String key, in String value, out boolean success); … … 127 134 [notify, domain=DOMStorage] void selectDOMStorage(out int storageId); 128 135 #endif 136 129 137 #if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS 138 139 /////////////////////////////////////////////////////////////////////// 140 // AppCache API 141 /////////////////////////////////////////////////////////////////////// 142 130 143 [domain=ApplicationCache] void getApplicationCaches(out Value applicationCaches); 131 144 [notify, domain=ApplicationCache] void updateApplicationCacheStatus(out int status); 132 145 [notify, domain=ApplicationCache] void updateNetworkState(out boolean isNowOnline); 133 146 #endif 147 134 148 #if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM 149 150 /////////////////////////////////////////////////////////////////////// 151 // Filesystem API 152 /////////////////////////////////////////////////////////////////////// 153 135 154 [domain=FileSystem] void getFileSystemPathAsync(in unsigned int type, in String origin); 136 155 [domain=FileSystem] void revealFolderInOS(in String path); … … 204 223 /////////////////////////////////////////////////////////////////////// 205 224 206 [domain= Backend] void enableDebugger(in boolean always);207 [domain=Inspector] void disableDebugger(in boolean always); // FIXME: should be on the same domain as enableDebugger.225 [domain=Inspector] void enableDebuggerFromFrontend(in boolean always); 226 [domain=Inspector] void disableDebugger(in boolean always); 208 227 [notify, domain=Debugger] void debuggerWasEnabled(); 209 228 [notify, domain=Debugger] void debuggerWasDisabled(); -
trunk/WebCore/inspector/InspectorController.cpp
r74761 r74785 58 58 #include "InjectedScript.h" 59 59 #include "InjectedScriptHost.h" 60 #include "InspectorBackend.h"61 60 #include "InspectorBackendDispatcher.h" 62 61 #include "InspectorCSSAgent.h" … … 72 71 #include "InspectorResourceAgent.h" 73 72 #include "InspectorState.h" 74 #include "InspectorStorageAgent.h"75 73 #include "InspectorTimelineAgent.h" 76 74 #include "InspectorValues.h" … … 107 105 #if ENABLE(DATABASE) 108 106 #include "Database.h" 107 #include "InspectorDatabaseAgent.h" 108 #endif 109 110 #if ENABLE(DOM_STORAGE) 111 #include "InspectorDOMStorageAgent.h" 112 #include "Storage.h" 113 #include "StorageArea.h" 109 114 #endif 110 115 … … 115 120 #if ENABLE(FILE_SYSTEM) 116 121 #include "InspectorFileSystemAgent.h" 117 #endif118 119 #if ENABLE(DOM_STORAGE)120 #include "Storage.h"121 #include "StorageArea.h"122 122 #endif 123 123 … … 145 145 , m_previousMessage(0) 146 146 , m_settingsLoaded(false) 147 , m_inspectorBackend(InspectorBackend::create(this))148 147 , m_inspectorBackendDispatcher(new InspectorBackendDispatcher(this)) 149 148 , m_injectedScriptHost(InjectedScriptHost::create(this)) … … 168 167 releaseFrontendLifetimeAgents(); 169 168 170 m_inspectorBackend->disconnectController();171 169 m_injectedScriptHost->disconnectController(); 172 170 } … … 477 475 478 476 #if ENABLE(DATABASE) 479 m_storageAgent = InspectorStorageAgent::create(m_frontend.get()); 477 m_databaseAgent = InspectorDatabaseAgent::create(&m_databaseResources, m_frontend.get()); 478 #endif 479 480 #if ENABLE(DOM_STORAGE) 481 m_domStorageAgent = InspectorDOMStorageAgent::create(&m_domStorageResources, m_frontend.get()); 480 482 #endif 481 483 … … 593 595 594 596 #if ENABLE(DATABASE) 595 if (m_storageAgent) 596 m_storageAgent->clearFrontend(); 597 m_storageAgent.clear(); 597 if (m_databaseAgent) 598 m_databaseAgent->clearFrontend(); 599 m_databaseAgent.clear(); 600 #endif 601 602 #if ENABLE(DOM_STORAGE) 603 m_domStorageAgent.clear(); 598 604 #endif 599 605 … … 1036 1042 1037 1043 #if ENABLE(DATABASE) 1038 void InspectorController::selectDatabase(Database* database)1039 {1040 if (!m_frontend)1041 return;1042 1043 for (DatabaseResourcesMap::iterator it = m_databaseResources.begin(); it != m_databaseResources.end(); ++it) {1044 if (it->second->database() == database) {1045 m_frontend->selectDatabase(it->first);1046 break;1047 }1048 }1049 }1050 1051 Database* InspectorController::databaseForId(long databaseId)1052 {1053 DatabaseResourcesMap::iterator it = m_databaseResources.find(databaseId);1054 if (it == m_databaseResources.end())1055 return 0;1056 return it->second->database();1057 }1058 1059 1044 void InspectorController::didOpenDatabase(PassRefPtr<Database> database, const String& domain, const String& name, const String& version) 1060 1045 { … … 1175 1160 if (m_frontend) 1176 1161 resource->bind(m_frontend.get()); 1177 }1178 1179 void InspectorController::selectDOMStorage(Storage* storage)1180 {1181 ASSERT(storage);1182 if (!m_frontend)1183 return;1184 1185 Frame* frame = storage->frame();1186 ExceptionCode ec = 0;1187 bool isLocalStorage = (frame->domWindow()->localStorage(ec) == storage && !ec);1188 long storageResourceId = 0;1189 DOMStorageResourcesMap::iterator domStorageEnd = m_domStorageResources.end();1190 for (DOMStorageResourcesMap::iterator it = m_domStorageResources.begin(); it != domStorageEnd; ++it) {1191 if (it->second->isSameHostAndType(frame, isLocalStorage)) {1192 storageResourceId = it->first;1193 break;1194 }1195 }1196 if (storageResourceId)1197 m_frontend->selectDOMStorage(storageResourceId);1198 }1199 1200 void InspectorController::getDOMStorageEntries(long storageId, RefPtr<InspectorArray>* entries)1201 {1202 InspectorDOMStorageResource* storageResource = getDOMStorageResourceForId(storageId);1203 if (storageResource) {1204 storageResource->startReportingChangesToFrontend();1205 Storage* domStorage = storageResource->domStorage();1206 for (unsigned i = 0; i < domStorage->length(); ++i) {1207 String name(domStorage->key(i));1208 String value(domStorage->getItem(name));1209 RefPtr<InspectorArray> entry = InspectorArray::create();1210 entry->pushString(name);1211 entry->pushString(value);1212 (*entries)->pushArray(entry);1213 }1214 }1215 }1216 1217 void InspectorController::setDOMStorageItem(long storageId, const String& key, const String& value, bool* success)1218 {1219 InspectorDOMStorageResource* storageResource = getDOMStorageResourceForId(storageId);1220 if (storageResource) {1221 ExceptionCode exception = 0;1222 storageResource->domStorage()->setItem(key, value, exception);1223 *success = !exception;1224 }1225 }1226 1227 void InspectorController::removeDOMStorageItem(long storageId, const String& key, bool* success)1228 {1229 InspectorDOMStorageResource* storageResource = getDOMStorageResourceForId(storageId);1230 if (storageResource) {1231 storageResource->domStorage()->removeItem(key);1232 *success = true;1233 }1234 }1235 1236 InspectorDOMStorageResource* InspectorController::getDOMStorageResourceForId(long storageId)1237 {1238 DOMStorageResourcesMap::iterator it = m_domStorageResources.find(storageId);1239 if (it == m_domStorageResources.end())1240 return 0;1241 return it->second.get();1242 1162 } 1243 1163 #endif … … 1508 1428 #endif 1509 1429 1430 void InspectorController::setInjectedScriptSource(const String& source) 1431 { 1432 injectedScriptHost()->setInjectedScriptSource(source); 1433 } 1434 1435 void InspectorController::dispatchOnInjectedScript(long injectedScriptId, const String& methodName, const String& arguments, RefPtr<InspectorValue>* result, bool* hadException) 1436 { 1437 if (!m_frontend) 1438 return; 1439 1440 // FIXME: explicitly pass injectedScriptId along with node id to the frontend. 1441 bool injectedScriptIdIsNodeId = injectedScriptId <= 0; 1442 1443 InjectedScript injectedScript; 1444 if (injectedScriptIdIsNodeId) 1445 injectedScript = injectedScriptForNodeId(-injectedScriptId); 1446 else 1447 injectedScript = injectedScriptHost()->injectedScriptForId(injectedScriptId); 1448 1449 if (injectedScript.hasNoValue()) 1450 return; 1451 1452 injectedScript.dispatch(methodName, arguments, result, hadException); 1453 } 1454 1455 void InspectorController::releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup) 1456 { 1457 injectedScriptHost()->releaseWrapperObjectGroup(injectedScriptId, objectGroup); 1458 } 1459 1510 1460 void InspectorController::evaluateForTestInFrontend(long callId, const String& script) 1511 1461 { -
trunk/WebCore/inspector/InspectorController.h
r74761 r74785 57 57 class InjectedScriptHost; 58 58 class InspectorArray; 59 class InspectorBackend;60 59 class InspectorBackendDispatcher; 61 60 class InspectorClient; 62 61 class InspectorCSSAgent; 63 62 class InspectorDOMAgent; 63 class InspectorDOMStorageAgent; 64 64 class InspectorDOMStorageResource; 65 class InspectorDatabaseAgent; 65 66 class InspectorDatabaseResource; 66 67 class InspectorDebuggerAgent; … … 86 87 class ScriptProfile; 87 88 class SharedBuffer; 88 class Storage;89 89 class StorageArea; 90 90 … … 104 104 class InspectorController : public Noncopyable { 105 105 public: 106 typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap;107 typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap;108 109 106 static const char* const ConsolePanel; 110 107 static const char* const ElementsPanel; … … 115 112 ~InspectorController(); 116 113 117 InspectorBackend* inspectorBackend() { return m_inspectorBackend.get(); }118 114 InspectorBackendDispatcher* inspectorBackendDispatcher() { return m_inspectorBackendDispatcher.get(); } 119 115 InspectorClient* inspectorClient() { return m_client; } … … 190 186 #endif 191 187 192 #if ENABLE(FILE_SYSTEM)193 InspectorFileSystemAgent* fileSystemAgent() { return m_fileSystemAgent.get(); }194 #endif195 196 188 void mainResourceFiredLoadEvent(DocumentLoader*, const KURL&); 197 189 void mainResourceFiredDOMContentEvent(DocumentLoader*, const KURL&); … … 208 200 void didOpenDatabase(PassRefPtr<Database>, const String& domain, const String& name, const String& version); 209 201 #endif 202 210 203 #if ENABLE(DOM_STORAGE) 211 204 void didUseDOMStorage(StorageArea* storageArea, bool isLocalStorage, Frame* frame); 212 void selectDOMStorage(Storage* storage); 213 void getDOMStorageEntries(long storageId, RefPtr<InspectorArray>* entries); 214 void setDOMStorageItem(long storageId, const String& key, const String& value, bool* success); 215 void removeDOMStorageItem(long storageId, const String& key, bool* success); 216 #endif 205 #endif 206 217 207 #if ENABLE(WEB_SOCKETS) 218 208 void didCreateWebSocket(unsigned long identifier, const KURL& requestURL, const KURL& documentURL); … … 251 241 void disableProfiler(bool always = false); 252 242 bool profilerEnabled() const; 253 InspectorProfilerAgent* profilerAgent() const { return m_profilerAgent.get(); }254 243 255 244 void enableDebugger(); 256 245 void disableDebugger(bool always = false); 257 246 bool debuggerEnabled() const { return m_debuggerAgent; } 258 InspectorDebuggerAgent* debuggerAgent() const { return m_debuggerAgent.get(); }259 247 void resume(); 260 248 … … 267 255 bool hasXHRBreakpoint(const String& url, String* breakpointURL); 268 256 #endif 257 258 void setInjectedScriptSource(const String& source); 259 void dispatchOnInjectedScript(long injectedScriptId, const String& methodName, const String& arguments, RefPtr<InspectorValue>* result, bool* hadException); 260 261 // Generic code called from custom implementations. 262 void releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup); 269 263 270 264 void evaluateForTestInFrontend(long testCallId, const String& script); … … 307 301 308 302 void setMonitoringXHREnabled(bool enabled, bool* newState); 309 InspectorCSSAgent* cssAgent() { return m_cssAgent.get(); }310 InspectorDOMAgent* domAgent() { return m_domAgent.get(); }311 303 void releaseFrontendLifetimeAgents(); 312 304 … … 316 308 void restoreStickyBreakpoints(); 317 309 void restoreStickyBreakpoint(PassRefPtr<InspectorObject> breakpoint); 318 #endif319 #if ENABLE(DATABASE)320 void selectDatabase(Database* database);321 Database* databaseForId(long databaseId);322 #endif323 #if ENABLE(DOM_STORAGE)324 InspectorDOMStorageResource* getDOMStorageResourceForId(long storageId);325 310 #endif 326 311 … … 343 328 OwnPtr<InspectorCSSAgent> m_cssAgent; 344 329 RefPtr<InspectorDOMAgent> m_domAgent; 345 RefPtr<InspectorStorageAgent> m_storageAgent; 330 331 #if ENABLE(DATABASE) 332 RefPtr<InspectorDatabaseAgent> m_databaseAgent; 333 #endif 334 335 #if ENABLE(DOM_STORAGE) 336 RefPtr<InspectorDOMStorageAgent> m_domStorageAgent; 337 #endif 338 346 339 OwnPtr<InspectorTimelineAgent> m_timelineAgent; 347 340 OwnPtr<InspectorState> m_state; … … 362 355 HashMap<String, double> m_times; 363 356 HashMap<String, unsigned> m_counts; 357 364 358 #if ENABLE(DATABASE) 359 typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap; 365 360 DatabaseResourcesMap m_databaseResources; 366 361 #endif 367 362 #if ENABLE(DOM_STORAGE) 363 typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap; 368 364 DOMStorageResourcesMap m_domStorageResources; 369 365 #endif 366 370 367 String m_showAfterVisible; 371 368 RefPtr<Node> m_highlightedNode; 372 369 ConsoleMessage* m_previousMessage; 373 370 bool m_settingsLoaded; 374 RefPtr<InspectorBackend> m_inspectorBackend;375 371 OwnPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher; 376 372 RefPtr<InjectedScriptHost> m_injectedScriptHost; -
trunk/WebCore/inspector/InspectorDOMStorageAgent.h
r74784 r74785 27 27 */ 28 28 29 #ifndef Inspector StorageAgent_h30 #define Inspector StorageAgent_h29 #ifndef InspectorDOMStorageAgent_h 30 #define InspectorDOMStorageAgent_h 31 31 32 32 #include "PlatformString.h" 33 #include "wtf/HashMap.h" 33 34 #include "wtf/PassRefPtr.h" 34 35 35 36 namespace WebCore { 36 37 37 class Database; 38 class InspectorArray; 39 class InspectorController; 40 class InspectorDOMStorageResource; 38 41 class InspectorFrontend; 42 class Storage; 39 43 40 class Inspector StorageAgent : public RefCounted<InspectorStorageAgent> {44 class InspectorDOMStorageAgent : public RefCounted<InspectorDOMStorageAgent> { 41 45 public: 42 static PassRefPtr<InspectorStorageAgent> create(InspectorFrontend* frontend) 46 typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap; 47 48 static PassRefPtr<InspectorDOMStorageAgent> create(DOMStorageResourcesMap* domStorageResources, InspectorFrontend* frontend) 43 49 { 44 return adoptRef(new Inspector StorageAgent(frontend));50 return adoptRef(new InspectorDOMStorageAgent(domStorageResources, frontend)); 45 51 } 46 52 47 virtual ~Inspector StorageAgent();53 virtual ~InspectorDOMStorageAgent(); 48 54 49 long executeSQL(Database*, const String& query); 55 // Called from the front-end. 56 void getDOMStorageEntries(long storageId, RefPtr<InspectorArray>* entries); 57 void setDOMStorageItem(long storageId, const String& key, const String& value, bool* success); 58 void removeDOMStorageItem(long storageId, const String& key, bool* success); 59 60 // Called from the injected script. 61 void selectDOMStorage(Storage* storage); 50 62 51 63 InspectorFrontend* frontend() { return m_frontend; } 52 void clearFrontend();53 64 54 65 private: 55 Inspector StorageAgent(InspectorFrontend*);66 InspectorDOMStorageAgent(DOMStorageResourcesMap*, InspectorFrontend*); 56 67 68 InspectorDOMStorageResource* getDOMStorageResourceForId(long storageId); 69 70 DOMStorageResourcesMap* m_domStorageResources; 57 71 InspectorFrontend* m_frontend; 58 72 }; … … 60 74 } // namespace WebCore 61 75 62 #endif // !defined(Inspector StorageAgent_h)76 #endif // !defined(InspectorDOMStorageAgent_h) -
trunk/WebCore/inspector/InspectorDatabaseAgent.cpp
r74784 r74785 29 29 #include "config.h" 30 30 31 #include "Inspector StorageAgent.h"31 #include "InspectorDatabaseAgent.h" 32 32 33 33 #if ENABLE(INSPECTOR) && ENABLE(DATABASE) … … 36 36 #include "ExceptionCode.h" 37 37 #include "InspectorFrontend.h" 38 #include "InspectorController.h" 39 #include "InspectorDatabaseResource.h" 38 40 #include "InspectorValues.h" 39 41 #include "SQLError.h" … … 55 57 long lastTransactionId = 0; 56 58 57 void reportTransactionFailed(Inspector StorageAgent* agent, long transactionId, SQLError* error)59 void reportTransactionFailed(InspectorDatabaseAgent* agent, long transactionId, SQLError* error) 58 60 { 59 61 if (!agent->frontend()) … … 67 69 class StatementCallback : public SQLStatementCallback { 68 70 public: 69 static PassRefPtr<StatementCallback> create(long transactionId, PassRefPtr<Inspector StorageAgent> agent)71 static PassRefPtr<StatementCallback> create(long transactionId, PassRefPtr<InspectorDatabaseAgent> agent) 70 72 { 71 73 return adoptRef(new StatementCallback(transactionId, agent)); … … 101 103 102 104 private: 103 StatementCallback(long transactionId, PassRefPtr<Inspector StorageAgent> agent)105 StatementCallback(long transactionId, PassRefPtr<InspectorDatabaseAgent> agent) 104 106 : m_transactionId(transactionId) 105 107 , m_agent(agent) { } 106 108 long m_transactionId; 107 RefPtr<Inspector StorageAgent> m_agent;109 RefPtr<InspectorDatabaseAgent> m_agent; 108 110 }; 109 111 110 112 class StatementErrorCallback : public SQLStatementErrorCallback { 111 113 public: 112 static PassRefPtr<StatementErrorCallback> create(long transactionId, PassRefPtr<Inspector StorageAgent> agent)114 static PassRefPtr<StatementErrorCallback> create(long transactionId, PassRefPtr<InspectorDatabaseAgent> agent) 113 115 { 114 116 return adoptRef(new StatementErrorCallback(transactionId, agent)); … … 124 126 125 127 private: 126 StatementErrorCallback(long transactionId, RefPtr<Inspector StorageAgent> agent)128 StatementErrorCallback(long transactionId, RefPtr<InspectorDatabaseAgent> agent) 127 129 : m_transactionId(transactionId) 128 130 , m_agent(agent) { } 129 131 long m_transactionId; 130 RefPtr<Inspector StorageAgent> m_agent;132 RefPtr<InspectorDatabaseAgent> m_agent; 131 133 }; 132 134 133 135 class TransactionCallback : public SQLTransactionCallback { 134 136 public: 135 static PassRefPtr<TransactionCallback> create(const String& sqlStatement, long transactionId, PassRefPtr<Inspector StorageAgent> agent)137 static PassRefPtr<TransactionCallback> create(const String& sqlStatement, long transactionId, PassRefPtr<InspectorDatabaseAgent> agent) 136 138 { 137 139 return adoptRef(new TransactionCallback(sqlStatement, transactionId, agent)); … … 153 155 } 154 156 private: 155 TransactionCallback(const String& sqlStatement, long transactionId, PassRefPtr<Inspector StorageAgent> agent)157 TransactionCallback(const String& sqlStatement, long transactionId, PassRefPtr<InspectorDatabaseAgent> agent) 156 158 : m_sqlStatement(sqlStatement) 157 159 , m_transactionId(transactionId) … … 159 161 String m_sqlStatement; 160 162 long m_transactionId; 161 RefPtr<Inspector StorageAgent> m_agent;163 RefPtr<InspectorDatabaseAgent> m_agent; 162 164 }; 163 165 164 166 class TransactionErrorCallback : public SQLTransactionErrorCallback { 165 167 public: 166 static PassRefPtr<TransactionErrorCallback> create(long transactionId, PassRefPtr<Inspector StorageAgent> agent)168 static PassRefPtr<TransactionErrorCallback> create(long transactionId, PassRefPtr<InspectorDatabaseAgent> agent) 167 169 { 168 170 return adoptRef(new TransactionErrorCallback(transactionId, agent)); … … 177 179 } 178 180 private: 179 TransactionErrorCallback(long transactionId, PassRefPtr<Inspector StorageAgent> agent)181 TransactionErrorCallback(long transactionId, PassRefPtr<InspectorDatabaseAgent> agent) 180 182 : m_transactionId(transactionId) 181 183 , m_agent(agent) { } 182 184 long m_transactionId; 183 RefPtr<Inspector StorageAgent> m_agent;185 RefPtr<InspectorDatabaseAgent> m_agent; 184 186 }; 185 187 … … 201 203 } // namespace 202 204 203 InspectorStorageAgent::InspectorStorageAgent(InspectorFrontend* frontend) 204 : m_frontend(frontend) 205 { 206 } 207 208 InspectorStorageAgent::~InspectorStorageAgent() 209 { 210 } 211 212 long InspectorStorageAgent::executeSQL(Database* database, const String& query) 213 { 214 long transactionId = ++lastTransactionId; 215 RefPtr<SQLTransactionCallback> callback(TransactionCallback::create(query, transactionId, this)); 216 RefPtr<SQLTransactionErrorCallback> errorCallback(TransactionErrorCallback::create(transactionId, this)); 205 InspectorDatabaseAgent::~InspectorDatabaseAgent() 206 { 207 } 208 209 void InspectorDatabaseAgent::getDatabaseTableNames(long databaseId, RefPtr<InspectorArray>* names) 210 { 211 Database* database = databaseForId(databaseId); 212 if (database) { 213 Vector<String> tableNames = database->tableNames(); 214 unsigned length = tableNames.size(); 215 for (unsigned i = 0; i < length; ++i) 216 (*names)->pushString(tableNames[i]); 217 } 218 } 219 220 void InspectorDatabaseAgent::executeSQL(long databaseId, const String& query, bool* success, long* transactionId) 221 { 222 Database* database = databaseForId(databaseId); 223 if (!database) { 224 *success = false; 225 return; 226 } 227 228 *transactionId = ++lastTransactionId; 229 RefPtr<SQLTransactionCallback> callback(TransactionCallback::create(query, *transactionId, this)); 230 RefPtr<SQLTransactionErrorCallback> errorCallback(TransactionErrorCallback::create(*transactionId, this)); 217 231 RefPtr<VoidCallback> successCallback(TransactionSuccessCallback::create()); 218 232 database->transaction(callback.release(), errorCallback.release(), successCallback.release()); 219 return transactionId; 220 } 221 222 void InspectorStorageAgent::clearFrontend() 233 *success = true; 234 } 235 236 Database* InspectorDatabaseAgent::databaseForId(long databaseId) 237 { 238 DatabaseResourcesMap::iterator it = m_databaseResources->find(databaseId); 239 if (it == m_databaseResources->end()) 240 return 0; 241 return it->second->database(); 242 } 243 244 void InspectorDatabaseAgent::selectDatabase(Database* database) 245 { 246 if (!m_frontend) 247 return; 248 249 for (DatabaseResourcesMap::iterator it = m_databaseResources->begin(); it != m_databaseResources->end(); ++it) { 250 if (it->second->database() == database) { 251 m_frontend->selectDatabase(it->first); 252 break; 253 } 254 } 255 } 256 257 void InspectorDatabaseAgent::clearFrontend() 223 258 { 224 259 m_frontend = 0; 225 260 } 226 261 262 InspectorDatabaseAgent::InspectorDatabaseAgent(DatabaseResourcesMap* databaseResources, InspectorFrontend* frontend) 263 : m_databaseResources(databaseResources) 264 , m_frontend(frontend) 265 { 266 } 267 227 268 } // namespace WebCore 228 269 -
trunk/WebCore/inspector/InspectorDatabaseAgent.h
r74784 r74785 27 27 */ 28 28 29 #ifndef Inspector StorageAgent_h30 #define Inspector StorageAgent_h29 #ifndef InspectorDatabaseAgent_h 30 #define InspectorDatabaseAgent_h 31 31 32 32 #include "PlatformString.h" 33 #include "wtf/HashMap.h" 33 34 #include "wtf/PassRefPtr.h" 34 35 … … 36 37 37 38 class Database; 39 class InspectorArray; 40 class InspectorController; 41 class InspectorDatabaseResource; 38 42 class InspectorFrontend; 39 43 40 class Inspector StorageAgent : public RefCounted<InspectorStorageAgent> {44 class InspectorDatabaseAgent : public RefCounted<InspectorDatabaseAgent> { 41 45 public: 42 static PassRefPtr<InspectorStorageAgent> create(InspectorFrontend* frontend) 46 typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap; 47 48 static PassRefPtr<InspectorDatabaseAgent> create(DatabaseResourcesMap* databaseResources, InspectorFrontend* frontend) 43 49 { 44 return adoptRef(new Inspector StorageAgent(frontend));50 return adoptRef(new InspectorDatabaseAgent(databaseResources, frontend)); 45 51 } 46 52 47 virtual ~Inspector StorageAgent();53 virtual ~InspectorDatabaseAgent(); 48 54 49 long executeSQL(Database*, const String& query); 55 // Called from the front-end. 56 void getDatabaseTableNames(long databaseId, RefPtr<InspectorArray>* names); 57 void executeSQL(long databaseId, const String& query, bool* success, long* transactionId); 58 59 // Called from the injected script. 60 Database* databaseForId(long databaseId); 61 void selectDatabase(Database* database); 50 62 51 63 InspectorFrontend* frontend() { return m_frontend; } … … 53 65 54 66 private: 55 Inspector StorageAgent(InspectorFrontend*);67 InspectorDatabaseAgent(DatabaseResourcesMap*, InspectorFrontend*); 56 68 69 DatabaseResourcesMap* m_databaseResources; 57 70 InspectorFrontend* m_frontend; 58 71 }; … … 60 73 } // namespace WebCore 61 74 62 #endif // !defined(Inspector StorageAgent_h)75 #endif // !defined(InspectorDatabaseAgent_h) -
trunk/WebCore/inspector/front-end/ScriptsPanel.js
r74761 r74785 221 221 222 222 if (this._attachDebuggerWhenShown) { 223 InspectorBackend.enableDebugger (false);223 InspectorBackend.enableDebuggerFromFrontend(false); 224 224 delete this._attachDebuggerWhenShown; 225 225 } … … 393 393 { 394 394 if (this.element.parentElement) { 395 InspectorBackend.enableDebugger (false);395 InspectorBackend.enableDebuggerFromFrontend(false); 396 396 } else { 397 397 this._attachDebuggerWhenShown = true; … … 863 863 InspectorBackend.disableDebugger(true); 864 864 else 865 InspectorBackend.enableDebugger (!!optionalAlways);865 InspectorBackend.enableDebuggerFromFrontend(!!optionalAlways); 866 866 }, 867 867 -
trunk/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
r74761 r74785 39 39 #include "Event.h" 40 40 #include "Frame.h" 41 #include "InspectorBackend.h"42 41 #include "InspectorController.h" 43 42 #include "InspectorFrontendClientImpl.h"
Note: See TracChangeset
for help on using the changeset viewer.