<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[70956] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/70956">70956</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2010-10-29 16:57:20 -0700 (Fri, 29 Oct 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>2010-10-29  Kavita Kanetkar  &lt;kkanetkar@chromium.org&gt;

        Reviewed by Pavel Feldman.

        Web Inspector: FileSystem integration
        https://bugs.webkit.org/show_bug.cgi?id=45982

        Adding filesystem support for Inspector under storage tab. This fetches root paths for
        temporary and persistent filesystems and allows &quot;reveal folder in OS&quot; option that
        launches native file browser. Currently this feature is disabled for non-chromium platforms.

        * CMakeLists.txt:
        * English.lproj/localizedStrings.js:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * inspector/CodeGeneratorInspector.pm:
        * inspector/Inspector.idl:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::connectFrontend):
        (WebCore::InspectorController::releaseFrontendLifetimeAgents):
        * inspector/InspectorController.h:
        (WebCore::InspectorController::fileSystemAgent):
        * inspector/InspectorFileSystemAgent.cpp: Added.
        * inspector/InspectorFileSystemAgent.h: Added.
        * inspector/front-end/FileSystemView.js: Added.
        * inspector/front-end/Settings.js:
        * inspector/front-end/StoragePanel.js:
        (WebInspector.StoragePanel):
        (WebInspector.StoragePanel.prototype.reset):
        (WebInspector.StoragePanel.prototype.addFileSystem):
        (WebInspector.StoragePanel.prototype.showFileSystem):
        (WebInspector.StoragePanel.prototype.updateFileSystemPath):
        (WebInspector.StoragePanel.prototype.updateFileSystemError):
        (WebInspector.FileSystemTreeElement):
        (WebInspector.FileSystemTreeElement.prototype.onselect):
        * inspector/front-end/WebKit.qrc:
        * inspector/front-end/inspector.css:
        (.file-system-storage-tree-item .icon):
        * inspector/front-end/inspector.html:
        * inspector/front-end/inspector.js:
        (WebInspector.updateResource):
        (WebInspector._addFileSystemOrigin):
        (WebInspector.didGetFileSystemPath):
        (WebInspector.didGetFileSystemError):
        (WebInspector.reset):
        * platform/AsyncFileSystem.h:
        (WebCore::AsyncFileSystem::root):
        * platform/FileSystem.h:
        * platform/chromium/ChromiumBridge.h:
        * platform/chromium/FileSystemChromium.cpp:
        (WebCore::revealFolderInOS):
2010-10-29  Kavita Kanetkar  &lt;kkanetkar@chromium.org&gt;

        Reviewed by Pavel Feldman.

        Web Inspector: FileSystem integration
        https://bugs.webkit.org/show_bug.cgi?id=45982

        * public/WebFileUtilities.h:
        (WebKit::WebFileUtilities::revealFolderInOS):
        * src/ChromiumBridge.cpp:
        (WebCore::ChromiumBridge::revealFolderInOS):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreCMakeListstxt">trunk/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreEnglishlprojlocalizedStringsjs">trunk/WebCore/English.lproj/localizedStrings.js</a></li>
<li><a href="#trunkWebCoreGNUmakefileam">trunk/WebCore/GNUmakefile.am</a></li>
<li><a href="#trunkWebCoreWebCoregypi">trunk/WebCore/WebCore.gypi</a></li>
<li><a href="#trunkWebCoreWebCorepro">trunk/WebCore/WebCore.pro</a></li>
<li><a href="#trunkWebCoreWebCorevcprojWebCorevcproj">trunk/WebCore/WebCore.vcproj/WebCore.vcproj</a></li>
<li><a href="#trunkWebCoreinspectorCodeGeneratorInspectorpm">trunk/WebCore/inspector/CodeGeneratorInspector.pm</a></li>
<li><a href="#trunkWebCoreinspectorInspectoridl">trunk/WebCore/inspector/Inspector.idl</a></li>
<li><a href="#trunkWebCoreinspectorInspectorControllercpp">trunk/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorControllerh">trunk/WebCore/inspector/InspectorController.h</a></li>
<li><a href="#trunkWebCoreinspectorfrontendSettingsjs">trunk/WebCore/inspector/front-end/Settings.js</a></li>
<li><a href="#trunkWebCoreinspectorfrontendStoragePaneljs">trunk/WebCore/inspector/front-end/StoragePanel.js</a></li>
<li><a href="#trunkWebCoreinspectorfrontendWebKitqrc">trunk/WebCore/inspector/front-end/WebKit.qrc</a></li>
<li><a href="#trunkWebCoreinspectorfrontendinspectorcss">trunk/WebCore/inspector/front-end/inspector.css</a></li>
<li><a href="#trunkWebCoreinspectorfrontendinspectorhtml">trunk/WebCore/inspector/front-end/inspector.html</a></li>
<li><a href="#trunkWebCoreinspectorfrontendinspectorjs">trunk/WebCore/inspector/front-end/inspector.js</a></li>
<li><a href="#trunkWebCoreplatformAsyncFileSystemh">trunk/WebCore/platform/AsyncFileSystem.h</a></li>
<li><a href="#trunkWebCoreplatformFileSystemh">trunk/WebCore/platform/FileSystem.h</a></li>
<li><a href="#trunkWebCoreplatformchromiumChromiumBridgeh">trunk/WebCore/platform/chromium/ChromiumBridge.h</a></li>
<li><a href="#trunkWebCoreplatformchromiumFileSystemChromiumcpp">trunk/WebCore/platform/chromium/FileSystemChromium.cpp</a></li>
<li><a href="#trunkWebKitchromiumChangeLog">trunk/WebKit/chromium/ChangeLog</a></li>
<li><a href="#trunkWebKitchromiumpublicWebFileUtilitiesh">trunk/WebKit/chromium/public/WebFileUtilities.h</a></li>
<li><a href="#trunkWebKitchromiumsrcChromiumBridgecpp">trunk/WebKit/chromium/src/ChromiumBridge.cpp</a></li>
<li><a href="#trunkWebKitchromiumsrcjsDevToolsjs">trunk/WebKit/chromium/src/js/DevTools.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkWebCoreinspectorInspectorFileSystemAgentcpp">trunk/WebCore/inspector/InspectorFileSystemAgent.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorFileSystemAgenth">trunk/WebCore/inspector/InspectorFileSystemAgent.h</a></li>
<li><a href="#trunkWebCoreinspectorfrontendFileSystemViewjs">trunk/WebCore/inspector/front-end/FileSystemView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/CMakeLists.txt (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/CMakeLists.txt        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/CMakeLists.txt        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -1119,6 +1119,7 @@
</span><span class="cx">     inspector/InspectorDOMStorageResource.cpp
</span><span class="cx">     inspector/InspectorDatabaseResource.cpp
</span><span class="cx">     inspector/InspectorDebuggerAgent.cpp
</span><ins>+    inspector/InspectorFileSystemAgent.cpp
</ins><span class="cx">     inspector/InspectorFrontendClientLocal.cpp
</span><span class="cx">     inspector/InspectorFrontendHost.cpp
</span><span class="cx">     inspector/InspectorInstrumentation.cpp
</span></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/ChangeLog        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2010-10-29  Kavita Kanetkar  &lt;kkanetkar@chromium.org&gt;
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: FileSystem integration
+        https://bugs.webkit.org/show_bug.cgi?id=45982
+
+        Adding filesystem support for Inspector under storage tab. This fetches root paths for
+        temporary and persistent filesystems and allows &quot;reveal folder in OS&quot; option that
+        launches native file browser. Currently this feature is disabled for non-chromium platforms.
+
+        * CMakeLists.txt:
+        * English.lproj/localizedStrings.js:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/Inspector.idl:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::connectFrontend):
+        (WebCore::InspectorController::releaseFrontendLifetimeAgents):
+        * inspector/InspectorController.h:
+        (WebCore::InspectorController::fileSystemAgent):
+        * inspector/InspectorFileSystemAgent.cpp: Added.
+        * inspector/InspectorFileSystemAgent.h: Added.
+        * inspector/front-end/FileSystemView.js: Added.
+        * inspector/front-end/Settings.js:
+        * inspector/front-end/StoragePanel.js:
+        (WebInspector.StoragePanel):
+        (WebInspector.StoragePanel.prototype.reset):
+        (WebInspector.StoragePanel.prototype.addFileSystem):
+        (WebInspector.StoragePanel.prototype.showFileSystem):
+        (WebInspector.StoragePanel.prototype.updateFileSystemPath):
+        (WebInspector.StoragePanel.prototype.updateFileSystemError):
+        (WebInspector.FileSystemTreeElement):
+        (WebInspector.FileSystemTreeElement.prototype.onselect):
+        * inspector/front-end/WebKit.qrc:
+        * inspector/front-end/inspector.css:
+        (.file-system-storage-tree-item .icon):
+        * inspector/front-end/inspector.html:
+        * inspector/front-end/inspector.js:
+        (WebInspector.updateResource):
+        (WebInspector._addFileSystemOrigin):
+        (WebInspector.didGetFileSystemPath):
+        (WebInspector.didGetFileSystemError):
+        (WebInspector.reset):
+        * platform/AsyncFileSystem.h:
+        (WebCore::AsyncFileSystem::root):
+        * platform/FileSystem.h:
+        * platform/chromium/ChromiumBridge.h:
+        * platform/chromium/FileSystemChromium.cpp:
+        (WebCore::revealFolderInOS):
+
</ins><span class="cx"> 2010-10-29  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin Adler.
</span></span></pre></div>
<a id="trunkWebCoreEnglishlprojlocalizedStringsjs"></a>
<div class="binary"><h4>Modified: trunk/WebCore/English.lproj/localizedStrings.js</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkWebCoreGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/GNUmakefile.am (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/GNUmakefile.am        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/GNUmakefile.am        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -1844,6 +1844,8 @@
</span><span class="cx">         WebCore/inspector/InspectorDOMAgent.h \
</span><span class="cx">         WebCore/inspector/InspectorDOMStorageResource.cpp \
</span><span class="cx">         WebCore/inspector/InspectorDOMStorageResource.h \
</span><ins>+    WebCore/inspector/InspectorFileSystemAgent.cpp \
+    WebCore/inspector/InspectorFileSystemAgent.h \
</ins><span class="cx">         WebCore/inspector/InspectorFrontendClient.h \
</span><span class="cx">         WebCore/inspector/InspectorFrontendClientLocal.cpp \
</span><span class="cx">         WebCore/inspector/InspectorFrontendClientLocal.h \
</span></span></pre></div>
<a id="trunkWebCoreWebCoregypi"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.gypi (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.gypi        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/WebCore.gypi        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -1946,6 +1946,8 @@
</span><span class="cx">             'inspector/InspectorDOMAgent.h',
</span><span class="cx">             'inspector/InspectorDOMStorageResource.cpp',
</span><span class="cx">             'inspector/InspectorDOMStorageResource.h',
</span><ins>+            'inspector/InspectorFileSystemAgent.cpp',
+            'inspector/InspectorFileSystemAgent.h',
</ins><span class="cx">             'inspector/InspectorFrontendClient.h',
</span><span class="cx">             'inspector/InspectorFrontendHost.cpp',
</span><span class="cx">             'inspector/InspectorFrontendHost.h',
</span><span class="lines">@@ -4419,6 +4421,7 @@
</span><span class="cx">             'inspector/front-end/ExtensionPanel.js',
</span><span class="cx">             'inspector/front-end/ExtensionRegistryStub.js',
</span><span class="cx">             'inspector/front-end/ExtensionServer.js',
</span><ins>+            'inspector/front-end/FileSystemView.js',
</ins><span class="cx">             'inspector/front-end/FontView.js',
</span><span class="cx">             'inspector/front-end/GoToLineDialog.js',
</span><span class="cx">             'inspector/front-end/HAREntry.js',
</span></span></pre></div>
<a id="trunkWebCoreWebCorepro"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.pro (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.pro        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/WebCore.pro        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -1010,6 +1010,7 @@
</span><span class="cx">     inspector/InspectorDebuggerAgent.cpp \
</span><span class="cx">     inspector/InspectorDOMAgent.cpp \
</span><span class="cx">     inspector/InspectorDOMStorageResource.cpp \
</span><ins>+    inspector/InspectorFileSystemAgent.cpp \
</ins><span class="cx">     inspector/InspectorFrontendClientLocal.cpp \
</span><span class="cx">     inspector/InspectorFrontendHost.cpp \
</span><span class="cx">     inspector/InspectorInstrumentation.cpp \
</span><span class="lines">@@ -1892,6 +1893,7 @@
</span><span class="cx">     inspector/InspectorDatabaseResource.h \
</span><span class="cx">     inspector/InspectorDebuggerAgent.h \
</span><span class="cx">     inspector/InspectorDOMStorageResource.h \
</span><ins>+    inspector/InspectorFileSystemAgent.h \
</ins><span class="cx">     inspector/InspectorFrontendClient.h \
</span><span class="cx">     inspector/InspectorFrontendClientLocal.h \
</span><span class="cx">     inspector/InspectorFrontendHost.h \
</span></span></pre></div>
<a id="trunkWebCoreWebCorevcprojWebCorevcproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.vcproj/WebCore.vcproj (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.vcproj/WebCore.vcproj        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/WebCore.vcproj/WebCore.vcproj        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -63768,6 +63768,14 @@
</span><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><ins>+                                RelativePath=&quot;..\inspector\InspectorFileSystemAgent.h&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\inspector\InspectorFileSystemAgent.cpp&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
</ins><span class="cx">                                 RelativePath=&quot;..\inspector\InspectorFrontendClient.h&quot;
</span><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="lines">@@ -64047,6 +64055,10 @@
</span><span class="cx">                                         &gt;
</span><span class="cx">                                 &lt;/File&gt;
</span><span class="cx">                                 &lt;File
</span><ins>+                                        RelativePath=&quot;..\inspector\front-end\FileSystemView.js&quot;
+                                        &gt;
+                                &lt;/File&gt;
+                                &lt;File
</ins><span class="cx">                                         RelativePath=&quot;..\inspector\front-end\FontView.js&quot;
</span><span class="cx">                                         &gt;
</span><span class="cx">                                 &lt;/File&gt;
</span></span></pre></div>
<a id="trunkWebCoreinspectorCodeGeneratorInspectorpm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/CodeGeneratorInspector.pm (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/CodeGeneratorInspector.pm        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/CodeGeneratorInspector.pm        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -43,6 +43,11 @@
</span><span class="cx">     &quot;header&quot; =&gt; &quot;InspectorApplicationCacheAgent.h&quot;,
</span><span class="cx">     &quot;domainAccessor&quot; =&gt; &quot;m_inspectorController-&gt;applicationCacheAgent()&quot;,
</span><span class="cx"> };
</span><ins>+$typeTransform{&quot;FileSystem&quot;} = {
+    &quot;forward&quot; =&gt; &quot;InspectorFileSystemAgent&quot;,
+    &quot;header&quot; =&gt; &quot;InspectorFileSystemAgent.h&quot;,
+    &quot;domainAccessor&quot; =&gt; &quot;m_inspectorController-&gt;fileSystemAgent()&quot;,
+};
</ins><span class="cx"> $typeTransform{&quot;Profiler&quot;} = {
</span><span class="cx">     &quot;forward&quot; =&gt; &quot;InspectorProfilerAgent&quot;,
</span><span class="cx">     &quot;header&quot; =&gt; &quot;InspectorProfilerAgent.h&quot;,
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectoridl"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/Inspector.idl (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/Inspector.idl        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/Inspector.idl        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -217,6 +217,13 @@
</span><span class="cx">         [handler=ApplicationCache] void getApplicationCaches(out Value applicationCaches);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if defined(ENABLE_FILE_SYSTEM) &amp;&amp; ENABLE_FILE_SYSTEM
+        [handler=FileSystem] void getFileSystemPathAsync(in unsigned int type, in String origin);
+        [handler=FileSystem] void revealFolderInOS(in String path);
+        [notify] void didGetFileSystemPath(out String root, out int type, out String origin);
+        [notify] void didGetFileSystemError(out int type, out String origin);
+#endif
+
</ins><span class="cx">         [handler=Backend] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);
</span><span class="cx">         [handler=Controller] void didEvaluateForTestInFrontend(in long testCallId, in String jsonResult);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/InspectorController.cpp (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorController.cpp        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/InspectorController.cpp        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -114,6 +114,10 @@
</span><span class="cx"> #include &quot;InspectorApplicationCacheAgent.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(FILE_SYSTEM)
+#include &quot;InspectorFileSystemAgent.h&quot;
+#endif
+
</ins><span class="cx"> #if ENABLE(DOM_STORAGE)
</span><span class="cx"> #include &quot;Storage.h&quot;
</span><span class="cx"> #include &quot;StorageArea.h&quot;
</span><span class="lines">@@ -500,6 +504,10 @@
</span><span class="cx">     m_applicationCacheAgent = new InspectorApplicationCacheAgent(this, m_frontend.get());
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(FILE_SYSTEM)
+    m_fileSystemAgent = InspectorFileSystemAgent::create(this, m_frontend.get());
+#endif
+    
</ins><span class="cx">     if (!InspectorInstrumentation::hasFrontends())
</span><span class="cx">         ScriptController::setCaptureCallStackForUncaughtExceptions(true);
</span><span class="cx">     InspectorInstrumentation::frontendCreated();
</span><span class="lines">@@ -605,6 +613,12 @@
</span><span class="cx"> #if ENABLE(OFFLINE_WEB_APPLICATIONS)
</span><span class="cx">     m_applicationCacheAgent.clear();
</span><span class="cx"> #endif
</span><ins>+
+#if ENABLE(FILE_SYSTEM)
+    if (m_fileSystemAgent)
+        m_fileSystemAgent-&gt;stop(); 
+        m_fileSystemAgent.clear();
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorController::populateScriptObjects()
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectorControllerh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/InspectorController.h (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorController.h        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/InspectorController.h        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -96,6 +96,10 @@
</span><span class="cx"> class InspectorApplicationCacheAgent;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(FILE_SYSTEM)
+class InspectorFileSystemAgent;
+#endif
+
</ins><span class="cx"> #if ENABLE(WEB_SOCKETS)
</span><span class="cx"> class WebSocketHandshakeRequest;
</span><span class="cx"> class WebSocketHandshakeResponse;
</span><span class="lines">@@ -194,6 +198,10 @@
</span><span class="cx">     InspectorApplicationCacheAgent* applicationCacheAgent() { return m_applicationCacheAgent.get(); }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(FILE_SYSTEM)
+    InspectorFileSystemAgent* fileSystemAgent() { return m_fileSystemAgent.get(); }
+#endif 
+
</ins><span class="cx">     void mainResourceFiredLoadEvent(DocumentLoader*, const KURL&amp;);
</span><span class="cx">     void mainResourceFiredDOMContentEvent(DocumentLoader*, const KURL&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -358,6 +366,11 @@
</span><span class="cx"> #if ENABLE(OFFLINE_WEB_APPLICATIONS)
</span><span class="cx">     OwnPtr&lt;InspectorApplicationCacheAgent&gt; m_applicationCacheAgent;
</span><span class="cx"> #endif
</span><ins>+    
+#if ENABLE(FILE_SYSTEM)
+    RefPtr&lt;InspectorFileSystemAgent&gt; m_fileSystemAgent;
+#endif 
+
</ins><span class="cx">     RefPtr&lt;Node&gt; m_nodeToFocus;
</span><span class="cx"> #if LEGACY_RESOURCE_TRACKING_ENABLED
</span><span class="cx">     RefPtr&lt;InspectorResource&gt; m_mainResource;
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectorFileSystemAgentcpp"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorFileSystemAgent.cpp (0 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorFileSystemAgent.cpp                                (rev 0)
+++ trunk/WebCore/inspector/InspectorFileSystemAgent.cpp        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -0,0 +1,156 @@
</span><ins>+/*
+ * Copyright (C) 2010 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
+ * &quot;AS IS&quot; 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 &quot;config.h&quot;
+#include &quot;InspectorFileSystemAgent.h&quot;
+
+#if ENABLE(INSPECTOR) &amp;&amp; ENABLE(FILE_SYSTEM)
+
+#include &quot;AsyncFileWriter.h&quot;
+#include &quot;Document.h&quot;
+#include &quot;FileSystem.h&quot;
+#include &quot;FileSystemCallbacks.h&quot;
+#include &quot;Frame.h&quot;
+#include &quot;FrameTree.h&quot;
+#include &quot;InspectorController.h&quot;
+#include &quot;InspectorFrontend.h&quot;
+#include &quot;LocalFileSystem.h&quot;
+#include &quot;Page.h&quot;
+
+namespace WebCore {
+
+class InspectorFileSystemAgentCallbacks : public AsyncFileSystemCallbacks {
+public:
+    InspectorFileSystemAgentCallbacks(InspectorFileSystemAgent* agent, AsyncFileSystem::Type type, const String&amp; origin)
+        : m_agent(agent)
+        , m_type(type)
+        , m_origin(origin)
+    { 
+    }
+
+    ~InspectorFileSystemAgentCallbacks()
+    {
+    }
+
+    // FileSystemCallbacks is only used for getting filesystem. All other methods are irrelevant and will not be called.
+    void didSucceed()
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+    void didOpenFileSystem(const String&amp; name, PassOwnPtr&lt;AsyncFileSystem&gt; fileSystem)
+    {
+        // Agent will be alive even if InspectorController is destroyed until callback is run.
+        m_agent-&gt;didGetFileSystemPath(fileSystem-&gt;root(), m_type, m_origin);
+    }
+
+    void didReadMetadata(const FileMetadata&amp;)
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+    void didReadDirectoryEntry(const String&amp; name, bool isDirectory)
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+    void didReadDirectoryEntries(bool hasMore)
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+    void didCreateFileWriter(PassOwnPtr&lt;AsyncFileWriter&gt; writer, long long length)
+    {
+        ASSERT_NOT_REACHED();
+    }
+    
+    void didFail(int code)
+    {
+        // FIXME: Is it useful to give back the code to Inspector UI?
+        m_agent-&gt;didGetFileSystemError(m_type, m_origin);
+    }
+
+private:
+    RefPtr&lt;InspectorFileSystemAgent&gt; m_agent;
+    AsyncFileSystem::Type m_type;
+    String m_origin;
+};
+
+InspectorFileSystemAgent::InspectorFileSystemAgent(InspectorController* inspectorController, InspectorFrontend* frontend)
+    : m_inspectorController(inspectorController)
+    , m_frontend(frontend)
+{
+}
+
+InspectorFileSystemAgent::~InspectorFileSystemAgent() { }
+
+void InspectorFileSystemAgent::stop()
+{
+    m_inspectorController = 0;
+}
+
+void InspectorFileSystemAgent::revealFolderInOS(const String&amp; path)
+{
+    WebCore::revealFolderInOS(path);
+}
+
+void InspectorFileSystemAgent::getFileSystemPathAsync(unsigned int type, const String&amp; origin)
+{
+    AsyncFileSystem::Type asyncFileSystemType = static_cast&lt;AsyncFileSystem::Type&gt;(type);
+    Frame* mainFrame = m_inspectorController-&gt;inspectedPage()-&gt;mainFrame();
+    for (Frame* frame = mainFrame; frame; frame = frame-&gt;tree()-&gt;traverseNext()) {
+        Document* document = frame-&gt;document();
+        if (document &amp;&amp; document-&gt;securityOrigin()-&gt;toString() == origin) {
+            LocalFileSystem::localFileSystem().requestFileSystem(document, asyncFileSystemType, 0, new InspectorFileSystemAgentCallbacks(this, asyncFileSystemType, origin));
+            return;
+        }
+    }
+}
+
+void InspectorFileSystemAgent::didGetFileSystemPath(const String&amp; root, AsyncFileSystem::Type type, const String&amp; origin)
+{
+    // When controller is being destroyed, this is set to 0. Agent can live even after m_inspectorController is destroyed.
+    if (!m_inspectorController)
+        return;
+
+    m_frontend-&gt;didGetFileSystemPath(root, static_cast&lt;unsigned int&gt;(type), origin);
+}
+
+void InspectorFileSystemAgent::didGetFileSystemError(AsyncFileSystem::Type type, const String&amp; origin)
+{
+    // When controller is being destroyed, this is set to 0. Agent can live even after m_inspectorController is destroyed.
+    if (!m_inspectorController)
+        return;
+    m_frontend-&gt;didGetFileSystemError(static_cast&lt;unsigned int&gt;(type), origin);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR) &amp;&amp; ENABLE(FILE_SYSTEM)
</ins></span></pre></div>
<a id="trunkWebCoreinspectorInspectorFileSystemAgenth"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorFileSystemAgent.h (0 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorFileSystemAgent.h                                (rev 0)
+++ trunk/WebCore/inspector/InspectorFileSystemAgent.h        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+/*
+ * Copyright (C) 2010 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
+ * &quot;AS IS&quot; 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 InspectorFileSystemAgent_h
+#define InspectorFileSystemAgent_h
+
+#if ENABLE(INSPECTOR) &amp;&amp; ENABLE(FILE_SYSTEM)
+
+#include &quot;AsyncFileSystem.h&quot;
+#include &quot;AsyncFileSystemCallbacks.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+
+namespace WebCore {
+
+class Document;
+class InspectorController;
+class InspectorFrontend;
+class LocalFileSystem;
+
+class InspectorFileSystemAgent : public RefCounted&lt;InspectorFileSystemAgent&gt; {
+public:
+    static PassRefPtr&lt;InspectorFileSystemAgent&gt; create(InspectorController* inspectorController, InspectorFrontend* frontend)
+    {
+        return adoptRef(new InspectorFileSystemAgent(inspectorController, frontend));
+    }
+
+    ~InspectorFileSystemAgent();
+    void stop(); 
+    
+    // From Frontend
+    void getFileSystemPathAsync(unsigned int type, const String&amp; origin);
+    void revealFolderInOS(const String&amp; path);
+    
+    // Backend to Frontend
+    void didGetFileSystemPath(const String&amp;, AsyncFileSystem::Type, const String&amp; origin);
+    void didGetFileSystemError(AsyncFileSystem::Type, const String&amp; origin);
+    
+private:
+    InspectorFileSystemAgent(InspectorController*, InspectorFrontend*);
+    void getFileSystemRoot(AsyncFileSystem::Type);
+
+    InspectorController* m_inspectorController;
+    InspectorFrontend* m_frontend;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR) &amp;&amp; ENABLE(FILE_SYSTEM)
+#endif // InspectorFileSystemAgent_h
</ins></span></pre></div>
<a id="trunkWebCoreinspectorfrontendFileSystemViewjs"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/front-end/FileSystemView.js (0 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/FileSystemView.js                                (rev 0)
+++ trunk/WebCore/inspector/front-end/FileSystemView.js        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -0,0 +1,182 @@
</span><ins>+/*
+ * Copyright (C) 2010 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
+ * &quot;AS IS&quot; 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.
+ */
+
+WebInspector.FileSystem = {}
+
+// Keep in sync with Type in AsyncFileSystem.h
+WebInspector.FileSystem.TEMPORARY = 0;
+WebInspector.FileSystem.PERSISTENT = 1;
+
+WebInspector.FileSystem.getFileSystemPathsAsync = function(origin)
+{
+    InspectorBackend.getFileSystemPathAsync(WebInspector.FileSystem.PERSISTENT, origin);
+    InspectorBackend.getFileSystemPathAsync(WebInspector.FileSystem.TEMPORARY, origin);
+}
+
+WebInspector.FileSystemView = function(treeElement, fileSystemOrigin)
+{
+    WebInspector.View.call(this);
+
+    this.element.addStyleClass(&quot;resource-view&quot;);
+    this._treeElement = treeElement;
+    this._origin = fileSystemOrigin;
+    this._tabbedPane = new WebInspector.TabbedPane(this.element);
+
+    this._persistentFileSystemElement = document.createElement(&quot;div&quot;);
+    this._persistentFileSystemElement.className = &quot;resource-view-headers&quot;;
+    this._tabbedPane.appendTab(&quot;persistent&quot;, WebInspector.UIString(&quot;Persistent File System&quot;), this._persistentFileSystemElement, this._selectFileSystemTab.bind(this, true));
+
+    this._tempFileSystemElement = document.createElement(&quot;div&quot;);
+    this._tempFileSystemElement.className = &quot;resource-view-headers&quot;;
+    this._tabbedPane.appendTab(&quot;temp&quot;, WebInspector.UIString(&quot;Temporary File System&quot;), this._tempFileSystemElement, this.selectTemporaryFileSystemTab.bind(this, true));
+
+    this._temporaryRoot = &quot;&quot;;
+    this._persistentRoot = &quot;&quot;;
+    this._persistentRootError = false;
+    this._temporaryRootError = false;
+    this.fileSystemVisible = true;
+    this._selectFileSystemTab();
+    this.refreshFileSystem();
+}
+
+WebInspector.FileSystemView.prototype = {
+    show: function(parentElement)
+    {
+        WebInspector.View.prototype.show.call(this, parentElement);
+        this._update();
+    },
+
+    set fileSystemVisible(x)
+    {
+        if (x === this._fileSystemVisible)
+            return;
+        this._fileSystemVisible = x;
+        if (x)
+            this.element.addStyleClass(&quot;headers-visible&quot;);
+        else
+            this.element.removeStyleClass(&quot;headers-visible&quot;); 
+        this._selectFileSystemTab();
+    },
+
+    _update: function()
+    {
+        this._selectFileSystemTab();
+        WebInspector.FileSystem.getFileSystemPathsAsync(this._origin);
+    },
+
+    updateFileSystemPath: function(root, type, origin)
+    {
+        if (origin == this._origin &amp;&amp; type == WebInspector.FileSystem.PERSISTENT) {
+            this._persistentRoot = root;
+            this._persistentRootError = false;
+        }
+        
+        if (origin == this._origin &amp;&amp; type == WebInspector.FileSystem.TEMPORARY) {
+            this._temporaryRoot = root;
+            this._temporaryRootErrorError = false;
+        }
+
+        this.refreshFileSystem();
+    },
+    
+    updateFileSystemError: function(type, origin)
+    {
+        if (type == WebInspector.FileSystem.PERSISTENT)
+            this._persistentRootError = true;
+        
+        if (type == WebInspector.FileSystem.TEMPORARY)
+            this._temporaryRootError = true;
+
+        this.refreshFileSystem();
+    },
+    
+    _selectFileSystemTab: function()
+    {
+        this._tabbedPane.selectTabById(&quot;persistent&quot;);
+    },
+    
+    selectTemporaryFileSystemTab: function()
+    {
+        this._tabbedPane.selectTabById(&quot;temp&quot;);
+    },
+
+    _revealPersistentFolderInOS: function()
+    {
+        InspectorBackend.revealFolderInOS(this._persistentRoot);
+    },
+    
+    _revealTemporaryFolderInOS: function()
+    {
+        InspectorBackend.revealFolderInOS(this._temporaryRoot);
+    },
+    
+    _createTextAndButton: function(fileSystemElement, rootPathText, type, isError)
+    {
+        fileSystemElement.removeChildren();
+        var rootPath = WebInspector.UIString(&quot;File System root path not available.&quot;);
+        if (isError)
+            rootPath = WebInspector.UIString(&quot;Error in fetching root path for file system.&quot;);
+        else if (rootPathText)
+            rootPath = rootPathText;
+               
+        var rootTextNode = document.createTextNode(&quot;Root: &quot; + rootPath.escapeHTML());
+        var rootSystemElement = document.createElement(&quot;div&quot;);
+        rootSystemElement.className = &quot;header-value source-code&quot;;
+        rootSystemElement.appendChild(rootTextNode);
+        fileSystemElement.appendChild(rootSystemElement);
+            
+        if (!isError &amp;&amp; rootPathText) {
+            // Append Browse button iff root path is available and it is not an error.
+            var contentElement = document.createElement(&quot;div&quot;);
+            contentElement.className = &quot;panel-enabler-view-content&quot;;
+            fileSystemElement.appendChild(contentElement);
+            var choicesForm = document.createElement(&quot;form&quot;);
+            contentElement.appendChild(choicesForm);
+            var enableButton = document.createElement(&quot;button&quot;);
+            enableButton.setAttribute(&quot;type&quot;, &quot;button&quot;);
+            enableButton.textContent = WebInspector.UIString(&quot;Reveal folder in OS&quot;);
+            // FIXME: Bind this directly to InspectorBackend.
+            if (type == WebInspector.FileSystem.PERSISTENT)
+                enableButton.addEventListener(&quot;click&quot;, this._revealPersistentFolderInOS.bind(this), false);
+            if (type == WebInspector.FileSystem.TEMPORARY)
+                enableButton.addEventListener(&quot;click&quot;, this._revealTemporaryFolderInOS.bind(this), false);
+            choicesForm.appendChild(enableButton);
+            fileSystemElement.appendChild(contentElement);
+        }
+    },
+    
+    refreshFileSystem: function()
+    {
+       this._createTextAndButton(this._persistentFileSystemElement, this._persistentRoot, WebInspector.FileSystem.PERSISTENT, this._persistentRootError);
+       this._createTextAndButton(this._tempFileSystemElement, this._temporaryRoot, WebInspector.FileSystem.TEMPORARY, this._temporaryRootError);
+    }, 
+}
+
+WebInspector.FileSystemView.prototype.__proto__ = WebInspector.View.prototype;
</ins></span></pre></div>
<a id="trunkWebCoreinspectorfrontendSettingsjs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/Settings.js (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/Settings.js        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/front-end/Settings.js        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">     nativeInstrumentationEnabled: false,
</span><span class="cx">     resourceExportEnabled: false,
</span><span class="cx">     networkPanelEnabled: false,
</span><ins>+    fileSystemEnabled: false,
</ins><span class="cx">     useDataURLForResourceImageIcons: true
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendStoragePaneljs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/StoragePanel.js (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/StoragePanel.js        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/front-end/StoragePanel.js        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -62,6 +62,12 @@
</span><span class="cx">     this.sidebarTree.appendChild(this.applicationCacheListTreeElement);
</span><span class="cx">     this.applicationCacheListTreeElement.expand();
</span><span class="cx"> 
</span><ins>+    if (Preferences.fileSystemEnabled) {
+        this.fileSystemListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString(&quot;File System&quot;), &quot;file-system-storage-tree-item&quot;);
+        this.sidebarTree.appendChild(this.fileSystemListTreeElement);
+        this.fileSystemListTreeElement.expand();
+    }
+       
</ins><span class="cx">     this.storageViews = document.createElement(&quot;div&quot;);
</span><span class="cx">     this.storageViews.id = &quot;storage-views&quot;;
</span><span class="cx">     this.element.appendChild(this.storageViews);
</span><span class="lines">@@ -102,7 +108,9 @@
</span><span class="cx">         this._domStorage = [];
</span><span class="cx"> 
</span><span class="cx">         this._cookieViews = {};
</span><del>-
</del><ins>+        
+        this._fileSystemView = null;
+        
</ins><span class="cx">         this._applicationCacheView = null;
</span><span class="cx">         delete this._cachedApplicationCacheViewStatus;
</span><span class="cx"> 
</span><span class="lines">@@ -111,7 +119,8 @@
</span><span class="cx">         this.sessionStorageListTreeElement.removeChildren();
</span><span class="cx">         this.cookieListTreeElement.removeChildren();
</span><span class="cx">         this.applicationCacheListTreeElement.removeChildren();
</span><del>-
</del><ins>+        if (Preferences.fileSystemEnabled)
+            this.fileSystemListTreeElement.removeChildren();
</ins><span class="cx">         this.storageViews.removeChildren();
</span><span class="cx"> 
</span><span class="cx">         this.storageViewStatusBarItemsContainer.removeChildren();
</span><span class="lines">@@ -229,6 +238,12 @@
</span><span class="cx">         this.applicationCacheListTreeElement.appendChild(applicationCacheTreeElement);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    addFileSystem: function(origin)
+    {
+        var fileSystemTreeElement = new WebInspector.FileSystemTreeElement(this, origin);
+        this.fileSystemListTreeElement.appendChild(fileSystemTreeElement);
+    },
+    
</ins><span class="cx">     selectDatabase: function(databaseId)
</span><span class="cx">     {
</span><span class="cx">         var database;
</span><span class="lines">@@ -352,6 +367,12 @@
</span><span class="cx">             this._applicationCacheView.updateStatus(this._cachedApplicationCacheViewStatus);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    showFileSystem: function(treeElement, fileSystemDomain)
+    {
+        this._fileSystemView =  new WebInspector.FileSystemView(treeElement, fileSystemDomain);
+        this._innerShowView(this._fileSystemView);
+    },
+    
</ins><span class="cx">     showCategoryView: function(categoryName)
</span><span class="cx">     {
</span><span class="cx">         if (!this._categoryView)
</span><span class="lines">@@ -500,6 +521,18 @@
</span><span class="cx">             this._applicationCacheView.updateStatus(status);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    updateFileSystemPath: function(root, type, origin)
+    {
+        if (this._fileSystemView &amp;&amp; this._fileSystemView === this.visibleView)
+            this._fileSystemView.updateFileSystemPath(root, type, origin);  
+    },
+  
+    updateFileSystemError: function(type, origin)
+    {
+        if (this._fileSystemView &amp;&amp; this._fileSystemView === this.visibleView)
+            this._fileSystemView.updateFileSystemError(type, origin);  
+    },
+
</ins><span class="cx">     updateNetworkState: function(isNowOnline)
</span><span class="cx">     {
</span><span class="cx">         if (this._applicationCacheView &amp;&amp; this._applicationCacheView === this.visibleView)
</span><span class="lines">@@ -921,6 +954,21 @@
</span><span class="cx"> }
</span><span class="cx"> WebInspector.ApplicationCacheTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
</span><span class="cx"> 
</span><ins>+WebInspector.FileSystemTreeElement = function(storagePanel, fileSystemDomain)
+{
+    WebInspector.BaseStorageTreeElement.call(this, storagePanel, null, fileSystemDomain ? fileSystemDomain : WebInspector.UIString(&quot;Local Files&quot;), &quot;file-system-storage-tree-item&quot;);
+    this._fileSystemDomain = fileSystemDomain;
+}
+
+WebInspector.FileSystemTreeElement.prototype = {
+    onselect: function()
+    {
+        this._storagePanel.showFileSystem(this, this._fileSystemDomain);
+    }
+}

+WebInspector.FileSystemTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;

</ins><span class="cx"> WebInspector.StorageCategoryView = function()
</span><span class="cx"> {
</span><span class="cx">     WebInspector.View.call(this);
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendWebKitqrc"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/WebKit.qrc (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/WebKit.qrc        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/front-end/WebKit.qrc        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">     &lt;file&gt;ExtensionPanel.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;ExtensionRegistryStub.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;ExtensionServer.js&lt;/file&gt;
</span><ins>+    &lt;file&gt;FileSystemView.js&lt;/file&gt;
</ins><span class="cx">     &lt;file&gt;FontView.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;GoToLineDialog.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;HAREntry.js&lt;/file&gt;
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendinspectorcss"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/inspector.css (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/inspector.css        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/front-end/inspector.css        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -1932,6 +1932,11 @@
</span><span class="cx">     content: url(Images/applicationCache.png);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/* FIXME: Make separate png for file-system */
+.file-system-storage-tree-item .icon {
+    content: url(Images/applicationCache.png);
+}
+
</ins><span class="cx"> #storage-views {
</span><span class="cx">     position: absolute;
</span><span class="cx">     top: 0;
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendinspectorhtml"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/inspector.html (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/inspector.html        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/front-end/inspector.html        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;DataGrid.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;CookieItemsView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;ApplicationCacheItemsView.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script type=&quot;text/javascript&quot; src=&quot;FileSystemView.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;Script.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;BreakpointManager.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;SidebarPane.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendinspectorjs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/inspector.js (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/inspector.js        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/inspector/front-end/inspector.js        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx">     resources: {},
</span><span class="cx">     cookieDomains: {},
</span><span class="cx">     applicationCacheDomains: {},
</span><ins>+    fileSystemOrigins: {},
</ins><span class="cx">     missingLocalizedStrings: {},
</span><span class="cx">     pendingDispatches: 0,
</span><span class="cx"> 
</span><span class="lines">@@ -1297,6 +1298,9 @@
</span><span class="cx">         if (parsedURL) {
</span><span class="cx">             this._addCookieDomain(parsedURL.host);
</span><span class="cx">             this._addAppCacheDomain(parsedURL.host);
</span><ins>+            if (Preferences.fileSystemEnabled)
+                // This should match the SecurityOrigin::toString(). FIXME: Add a test for this.
+                this._addFileSystemOrigin(parsedURL.scheme + &quot;://&quot; + parsedURL.host + (parsedURL.port ? (&quot;:&quot; + parsedURL.port) : &quot;&quot;));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1413,6 +1417,18 @@
</span><span class="cx">     this.panels.storage.addApplicationCache(domain);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebInspector._addFileSystemOrigin = function(origin)
+{
+    if (!this.panels.storage)
+        return;
+    // Eliminate duplicate origins.
+    // FIXME: Move appcache/cookies/filesystem domain dup checks in StoragePanel.js
+    if (origin in this.fileSystemOrigins)
+        return;
+    this.fileSystemOrigins[origin] = true;
+    this.panels.storage.addFileSystem(origin);
+}
+
</ins><span class="cx"> WebInspector.addDOMStorage = function(payload)
</span><span class="cx"> {
</span><span class="cx">     if (!this.panels.storage)
</span><span class="lines">@@ -1434,6 +1450,16 @@
</span><span class="cx">     this.panels.storage.updateApplicationCacheStatus(status);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebInspector.didGetFileSystemPath = function(root, type, origin)
+{
+    this.panels.storage.updateFileSystemPath(root, type, origin);
+}
+
+WebInspector.didGetFileSystemError = function(type, origin)
+{
+    this.panels.storage.updateFileSystemError(type, origin);
+}
+
</ins><span class="cx"> WebInspector.updateNetworkState = function(isNowOnline)
</span><span class="cx"> {
</span><span class="cx">     this.panels.storage.updateNetworkState(isNowOnline);
</span><span class="lines">@@ -1515,6 +1541,7 @@
</span><span class="cx">     this.resources = {};
</span><span class="cx">     this.cookieDomains = {};
</span><span class="cx">     this.applicationCacheDomains = {};
</span><ins>+    this.fileSystemOrigins = {};
</ins><span class="cx">     this.highlightDOMNode(0);
</span><span class="cx"> 
</span><span class="cx">     if (!Preferences.networkPanelEnabled)
</span></span></pre></div>
<a id="trunkWebCoreplatformAsyncFileSystemh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/AsyncFileSystem.h (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/AsyncFileSystem.h        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/platform/AsyncFileSystem.h        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -128,6 +128,9 @@
</span><span class="cx">     // Converts a given absolute virtual path to a platform path that starts with the platform root path of this file system.
</span><span class="cx">     virtual String virtualToPlatformPath(const String&amp; path) const;
</span><span class="cx"> 
</span><ins>+    // Getter for this file system's root path.
+    String root() const { return m_platformRootPath; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     AsyncFileSystem(const String&amp; platformRootPath)
</span><span class="cx">         : m_platformRootPath(platformRootPath)
</span></span></pre></div>
<a id="trunkWebCoreplatformFileSystemh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/FileSystem.h (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/FileSystem.h        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/platform/FileSystem.h        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -144,6 +144,7 @@
</span><span class="cx"> static const char PlatformFilePathSeparator = '/';
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+void revealFolderInOS(const String&amp;);
</ins><span class="cx"> bool fileExists(const String&amp;);
</span><span class="cx"> bool deleteFile(const String&amp;);
</span><span class="cx"> bool deleteEmptyDirectory(const String&amp;);
</span></span></pre></div>
<a id="trunkWebCoreplatformchromiumChromiumBridgeh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/chromium/ChromiumBridge.h (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/chromium/ChromiumBridge.h        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/platform/chromium/ChromiumBridge.h        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -121,6 +121,7 @@
</span><span class="cx">         static void prefetchDNS(const String&amp; hostname);
</span><span class="cx"> 
</span><span class="cx">         // File ---------------------------------------------------------------
</span><ins>+        static void revealFolderInOS(const String&amp;);
</ins><span class="cx">         static bool fileExists(const String&amp;);
</span><span class="cx">         static bool deleteFile(const String&amp;);
</span><span class="cx">         static bool deleteEmptyDirectory(const String&amp;);
</span></span></pre></div>
<a id="trunkWebCoreplatformchromiumFileSystemChromiumcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/chromium/FileSystemChromium.cpp (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/chromium/FileSystemChromium.cpp        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebCore/platform/chromium/FileSystemChromium.cpp        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -57,6 +57,11 @@
</span><span class="cx">     return ChromiumBridge::getFileModificationTime(path, result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void revealFolderInOS(const String&amp; path)
+{
+    ChromiumBridge::revealFolderInOS(path);
+}
+
</ins><span class="cx"> String directoryName(const String&amp; path)
</span><span class="cx"> {
</span><span class="cx">     return ChromiumBridge::directoryName(path);
</span></span></pre></div>
<a id="trunkWebKitchromiumChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/ChangeLog (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/ChangeLog        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebKit/chromium/ChangeLog        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2010-10-29  Kavita Kanetkar  &lt;kkanetkar@chromium.org&gt;
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: FileSystem integration
+        https://bugs.webkit.org/show_bug.cgi?id=45982
+
+        * public/WebFileUtilities.h:
+        (WebKit::WebFileUtilities::revealFolderInOS):
+        * src/ChromiumBridge.cpp:
+        (WebCore::ChromiumBridge::revealFolderInOS):
+
+
</ins><span class="cx"> 2010-10-29  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Sam Weinig.
</span></span></pre></div>
<a id="trunkWebKitchromiumpublicWebFileUtilitiesh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/public/WebFileUtilities.h (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/public/WebFileUtilities.h        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebKit/chromium/public/WebFileUtilities.h        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #else
</span><span class="cx">     typedef int FileHandle;
</span><span class="cx"> #endif
</span><del>-
</del><ins>+    virtual void revealFolderInOS(const WebString&amp; path) { }
</ins><span class="cx">     virtual bool fileExists(const WebString&amp; path) { return false; }
</span><span class="cx">     virtual bool deleteFile(const WebString&amp; path) { return false; }
</span><span class="cx">     virtual bool deleteEmptyDirectory(const WebString&amp; path) { return false; }
</span></span></pre></div>
<a id="trunkWebKitchromiumsrcChromiumBridgecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/src/ChromiumBridge.cpp (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/src/ChromiumBridge.cpp        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebKit/chromium/src/ChromiumBridge.cpp        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -345,6 +345,11 @@
</span><span class="cx">     return webKitClient()-&gt;fileUtilities()-&gt;getFileSize(path, result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ChromiumBridge::revealFolderInOS(const String&amp; path)
+{
+    webKitClient()-&gt;fileUtilities()-&gt;revealFolderInOS(path);
+}
+
</ins><span class="cx"> bool ChromiumBridge::getFileModificationTime(const String&amp; path, time_t&amp; result)
</span><span class="cx"> {
</span><span class="cx">     double modificationTime;
</span></span></pre></div>
<a id="trunkWebKitchromiumsrcjsDevToolsjs"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/src/js/DevTools.js (70955 => 70956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/src/js/DevTools.js        2010-10-29 23:53:16 UTC (rev 70955)
+++ trunk/WebKit/chromium/src/js/DevTools.js        2010-10-29 23:57:20 UTC (rev 70956)
</span><span class="lines">@@ -46,6 +46,8 @@
</span><span class="cx">     Preferences.canEditScriptSource = true;
</span><span class="cx">     Preferences.onlineDetectionEnabled = false;
</span><span class="cx">     Preferences.nativeInstrumentationEnabled = true;
</span><ins>+    // FIXME: Turn this to whatever the value of --enable-file-system for chrome.
+    Preferences.fileSystemEnabled = false;
</ins><span class="cx"> })();
</span><span class="cx"> 
</span><span class="cx"> var devtools = devtools || {};
</span></span></pre>
</div>
</div>

</body>
</html>