[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:18:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 39b6c6d1f8698c41aae5c292d65d954117a49660
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 29 23:57:20 2010 +0000

    2010-10-29  Kavita Kanetkar  <kkanetkar at chromium.org>
    
            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 "reveal folder in OS" 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  <kkanetkar at chromium.org>
    
            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):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 30fd99d..4b05477 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1119,6 +1119,7 @@ SET(WebCore_SOURCES
     inspector/InspectorDOMStorageResource.cpp
     inspector/InspectorDatabaseResource.cpp
     inspector/InspectorDebuggerAgent.cpp
+    inspector/InspectorFileSystemAgent.cpp
     inspector/InspectorFrontendClientLocal.cpp
     inspector/InspectorFrontendHost.cpp
     inspector/InspectorInstrumentation.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 44714b7..a97a4a8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,57 @@
+2010-10-29  Kavita Kanetkar  <kkanetkar at chromium.org>
+
+        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 "reveal folder in OS" 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  Ryosuke Niwa  <rniwa at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index 7403b22..a4a1997 100644
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 6c1bc35..cef9493 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1844,6 +1844,8 @@ webcore_sources += \
 	WebCore/inspector/InspectorDOMAgent.h \
 	WebCore/inspector/InspectorDOMStorageResource.cpp \
 	WebCore/inspector/InspectorDOMStorageResource.h \
+    WebCore/inspector/InspectorFileSystemAgent.cpp \
+    WebCore/inspector/InspectorFileSystemAgent.h \
 	WebCore/inspector/InspectorFrontendClient.h \
 	WebCore/inspector/InspectorFrontendClientLocal.cpp \
 	WebCore/inspector/InspectorFrontendClientLocal.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 934db17..ad01ddb 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1946,6 +1946,8 @@
             'inspector/InspectorDOMAgent.h',
             'inspector/InspectorDOMStorageResource.cpp',
             'inspector/InspectorDOMStorageResource.h',
+            'inspector/InspectorFileSystemAgent.cpp',
+            'inspector/InspectorFileSystemAgent.h',
             'inspector/InspectorFrontendClient.h',
             'inspector/InspectorFrontendHost.cpp',
             'inspector/InspectorFrontendHost.h',
@@ -4419,6 +4421,7 @@
             'inspector/front-end/ExtensionPanel.js',
             'inspector/front-end/ExtensionRegistryStub.js',
             'inspector/front-end/ExtensionServer.js',
+            'inspector/front-end/FileSystemView.js',
             'inspector/front-end/FontView.js',
             'inspector/front-end/GoToLineDialog.js',
             'inspector/front-end/HAREntry.js',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 132d36d..cacac5c 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1010,6 +1010,7 @@ SOURCES += \
     inspector/InspectorDebuggerAgent.cpp \
     inspector/InspectorDOMAgent.cpp \
     inspector/InspectorDOMStorageResource.cpp \
+    inspector/InspectorFileSystemAgent.cpp \
     inspector/InspectorFrontendClientLocal.cpp \
     inspector/InspectorFrontendHost.cpp \
     inspector/InspectorInstrumentation.cpp \
@@ -1892,6 +1893,7 @@ HEADERS += \
     inspector/InspectorDatabaseResource.h \
     inspector/InspectorDebuggerAgent.h \
     inspector/InspectorDOMStorageResource.h \
+    inspector/InspectorFileSystemAgent.h \
     inspector/InspectorFrontendClient.h \
     inspector/InspectorFrontendClientLocal.h \
     inspector/InspectorFrontendHost.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 0f894e6..ee0be2e 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -63768,6 +63768,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\inspector\InspectorFileSystemAgent.h"
+				>
+			</File>
+			<File
+				RelativePath="..\inspector\InspectorFileSystemAgent.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\inspector\InspectorFrontendClient.h"
 				>
 			</File>
@@ -64047,6 +64055,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\inspector\front-end\FileSystemView.js"
+					>
+				</File>
+				<File
 					RelativePath="..\inspector\front-end\FontView.js"
 					>
 				</File>
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index a566576..3a8a6cb 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -43,6 +43,11 @@ $typeTransform{"ApplicationCache"} = {
     "header" => "InspectorApplicationCacheAgent.h",
     "domainAccessor" => "m_inspectorController->applicationCacheAgent()",
 };
+$typeTransform{"FileSystem"} = {
+    "forward" => "InspectorFileSystemAgent",
+    "header" => "InspectorFileSystemAgent.h",
+    "domainAccessor" => "m_inspectorController->fileSystemAgent()",
+};
 $typeTransform{"Profiler"} = {
     "forward" => "InspectorProfilerAgent",
     "header" => "InspectorProfilerAgent.h",
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 331e504..e6e0a7f 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -217,6 +217,13 @@ module core {
         [handler=ApplicationCache] void getApplicationCaches(out Value applicationCaches);
 #endif
 
+#if defined(ENABLE_FILE_SYSTEM) && 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
+
         [handler=Backend] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);
         [handler=Controller] void didEvaluateForTestInFrontend(in long testCallId, in String jsonResult);
 
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 956ef7e..ec16201 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -114,6 +114,10 @@
 #include "InspectorApplicationCacheAgent.h"
 #endif
 
+#if ENABLE(FILE_SYSTEM)
+#include "InspectorFileSystemAgent.h"
+#endif
+
 #if ENABLE(DOM_STORAGE)
 #include "Storage.h"
 #include "StorageArea.h"
@@ -500,6 +504,10 @@ void InspectorController::connectFrontend()
     m_applicationCacheAgent = new InspectorApplicationCacheAgent(this, m_frontend.get());
 #endif
 
+#if ENABLE(FILE_SYSTEM)
+    m_fileSystemAgent = InspectorFileSystemAgent::create(this, m_frontend.get());
+#endif
+    
     if (!InspectorInstrumentation::hasFrontends())
         ScriptController::setCaptureCallStackForUncaughtExceptions(true);
     InspectorInstrumentation::frontendCreated();
@@ -605,6 +613,12 @@ void InspectorController::releaseFrontendLifetimeAgents()
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
     m_applicationCacheAgent.clear();
 #endif
+
+#if ENABLE(FILE_SYSTEM)
+    if (m_fileSystemAgent)
+        m_fileSystemAgent->stop(); 
+        m_fileSystemAgent.clear();
+#endif
 }
 
 void InspectorController::populateScriptObjects()
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index 80d094f..8b00835 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -96,6 +96,10 @@ class InspectorResource;
 class InspectorApplicationCacheAgent;
 #endif
 
+#if ENABLE(FILE_SYSTEM)
+class InspectorFileSystemAgent;
+#endif
+
 #if ENABLE(WEB_SOCKETS)
 class WebSocketHandshakeRequest;
 class WebSocketHandshakeResponse;
@@ -194,6 +198,10 @@ public:
     InspectorApplicationCacheAgent* applicationCacheAgent() { return m_applicationCacheAgent.get(); }
 #endif
 
+#if ENABLE(FILE_SYSTEM)
+    InspectorFileSystemAgent* fileSystemAgent() { return m_fileSystemAgent.get(); }
+#endif 
+
     void mainResourceFiredLoadEvent(DocumentLoader*, const KURL&);
     void mainResourceFiredDOMContentEvent(DocumentLoader*, const KURL&);
 
@@ -358,6 +366,11 @@ private:
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
     OwnPtr<InspectorApplicationCacheAgent> m_applicationCacheAgent;
 #endif
+    
+#if ENABLE(FILE_SYSTEM)
+    RefPtr<InspectorFileSystemAgent> m_fileSystemAgent;
+#endif 
+
     RefPtr<Node> m_nodeToFocus;
 #if LEGACY_RESOURCE_TRACKING_ENABLED
     RefPtr<InspectorResource> m_mainResource;
diff --git a/WebCore/inspector/InspectorFileSystemAgent.cpp b/WebCore/inspector/InspectorFileSystemAgent.cpp
new file mode 100644
index 0000000..1ac7fa5
--- /dev/null
+++ b/WebCore/inspector/InspectorFileSystemAgent.cpp
@@ -0,0 +1,156 @@
+/*
+ * 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
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "InspectorFileSystemAgent.h"
+
+#if ENABLE(INSPECTOR) && ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileWriter.h"
+#include "Document.h"
+#include "FileSystem.h"
+#include "FileSystemCallbacks.h"
+#include "Frame.h"
+#include "FrameTree.h"
+#include "InspectorController.h"
+#include "InspectorFrontend.h"
+#include "LocalFileSystem.h"
+#include "Page.h"
+
+namespace WebCore {
+
+class InspectorFileSystemAgentCallbacks : public AsyncFileSystemCallbacks {
+public:
+    InspectorFileSystemAgentCallbacks(InspectorFileSystemAgent* agent, AsyncFileSystem::Type type, const String& 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& name, PassOwnPtr<AsyncFileSystem> fileSystem)
+    {
+        // Agent will be alive even if InspectorController is destroyed until callback is run.
+        m_agent->didGetFileSystemPath(fileSystem->root(), m_type, m_origin);
+    }
+
+    void didReadMetadata(const FileMetadata&)
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+    void didReadDirectoryEntry(const String& name, bool isDirectory)
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+    void didReadDirectoryEntries(bool hasMore)
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+    void didCreateFileWriter(PassOwnPtr<AsyncFileWriter> 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->didGetFileSystemError(m_type, m_origin);
+    }
+
+private:
+    RefPtr<InspectorFileSystemAgent> 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& path)
+{
+    WebCore::revealFolderInOS(path);
+}
+
+void InspectorFileSystemAgent::getFileSystemPathAsync(unsigned int type, const String& origin)
+{
+    AsyncFileSystem::Type asyncFileSystemType = static_cast<AsyncFileSystem::Type>(type);
+    Frame* mainFrame = m_inspectorController->inspectedPage()->mainFrame();
+    for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext()) {
+        Document* document = frame->document();
+        if (document && document->securityOrigin()->toString() == origin) {
+            LocalFileSystem::localFileSystem().requestFileSystem(document, asyncFileSystemType, 0, new InspectorFileSystemAgentCallbacks(this, asyncFileSystemType, origin));
+            return;
+        }
+    }
+}
+
+void InspectorFileSystemAgent::didGetFileSystemPath(const String& root, AsyncFileSystem::Type type, const String& 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->didGetFileSystemPath(root, static_cast<unsigned int>(type), origin);
+}
+
+void InspectorFileSystemAgent::didGetFileSystemError(AsyncFileSystem::Type type, const String& 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->didGetFileSystemError(static_cast<unsigned int>(type), origin);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR) && ENABLE(FILE_SYSTEM)
diff --git a/WebCore/inspector/InspectorFileSystemAgent.h b/WebCore/inspector/InspectorFileSystemAgent.h
new file mode 100644
index 0000000..adb434d
--- /dev/null
+++ b/WebCore/inspector/InspectorFileSystemAgent.h
@@ -0,0 +1,76 @@
+/*
+ * 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
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef InspectorFileSystemAgent_h
+#define InspectorFileSystemAgent_h
+
+#if ENABLE(INSPECTOR) && ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include "AsyncFileSystemCallbacks.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class Document;
+class InspectorController;
+class InspectorFrontend;
+class LocalFileSystem;
+
+class InspectorFileSystemAgent : public RefCounted<InspectorFileSystemAgent> {
+public:
+    static PassRefPtr<InspectorFileSystemAgent> create(InspectorController* inspectorController, InspectorFrontend* frontend)
+    {
+        return adoptRef(new InspectorFileSystemAgent(inspectorController, frontend));
+    }
+
+    ~InspectorFileSystemAgent();
+    void stop(); 
+    
+    // From Frontend
+    void getFileSystemPathAsync(unsigned int type, const String& origin);
+    void revealFolderInOS(const String& path);
+    
+    // Backend to Frontend
+    void didGetFileSystemPath(const String&, AsyncFileSystem::Type, const String& origin);
+    void didGetFileSystemError(AsyncFileSystem::Type, const String& origin);
+    
+private:
+    InspectorFileSystemAgent(InspectorController*, InspectorFrontend*);
+    void getFileSystemRoot(AsyncFileSystem::Type);
+
+    InspectorController* m_inspectorController;
+    InspectorFrontend* m_frontend;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR) && ENABLE(FILE_SYSTEM)
+#endif // InspectorFileSystemAgent_h
diff --git a/WebCore/inspector/front-end/FileSystemView.js b/WebCore/inspector/front-end/FileSystemView.js
new file mode 100644
index 0000000..ae13db2
--- /dev/null
+++ b/WebCore/inspector/front-end/FileSystemView.js
@@ -0,0 +1,182 @@
+/*
+ * 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
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+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("resource-view");
+    this._treeElement = treeElement;
+    this._origin = fileSystemOrigin;
+    this._tabbedPane = new WebInspector.TabbedPane(this.element);
+
+    this._persistentFileSystemElement = document.createElement("div");
+    this._persistentFileSystemElement.className = "resource-view-headers";
+    this._tabbedPane.appendTab("persistent", WebInspector.UIString("Persistent File System"), this._persistentFileSystemElement, this._selectFileSystemTab.bind(this, true));
+
+    this._tempFileSystemElement = document.createElement("div");
+    this._tempFileSystemElement.className = "resource-view-headers";
+    this._tabbedPane.appendTab("temp", WebInspector.UIString("Temporary File System"), this._tempFileSystemElement, this.selectTemporaryFileSystemTab.bind(this, true));
+
+    this._temporaryRoot = "";
+    this._persistentRoot = "";
+    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("headers-visible");
+        else
+            this.element.removeStyleClass("headers-visible"); 
+        this._selectFileSystemTab();
+    },
+
+    _update: function()
+    {
+        this._selectFileSystemTab();
+        WebInspector.FileSystem.getFileSystemPathsAsync(this._origin);
+    },
+
+    updateFileSystemPath: function(root, type, origin)
+    {
+        if (origin == this._origin && type == WebInspector.FileSystem.PERSISTENT) {
+            this._persistentRoot = root;
+            this._persistentRootError = false;
+        }
+        
+        if (origin == this._origin && 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("persistent");
+    },
+    
+    selectTemporaryFileSystemTab: function()
+    {
+        this._tabbedPane.selectTabById("temp");
+    },
+
+    _revealPersistentFolderInOS: function()
+    {
+        InspectorBackend.revealFolderInOS(this._persistentRoot);
+    },
+    
+    _revealTemporaryFolderInOS: function()
+    {
+        InspectorBackend.revealFolderInOS(this._temporaryRoot);
+    },
+    
+    _createTextAndButton: function(fileSystemElement, rootPathText, type, isError)
+    {
+        fileSystemElement.removeChildren();
+        var rootPath = WebInspector.UIString("File System root path not available.");
+        if (isError)
+            rootPath = WebInspector.UIString("Error in fetching root path for file system.");
+        else if (rootPathText)
+            rootPath = rootPathText;
+               
+        var rootTextNode = document.createTextNode("Root: " + rootPath.escapeHTML());
+        var rootSystemElement = document.createElement("div");
+        rootSystemElement.className = "header-value source-code";
+        rootSystemElement.appendChild(rootTextNode);
+        fileSystemElement.appendChild(rootSystemElement);
+            
+        if (!isError && rootPathText) {
+            // Append Browse button iff root path is available and it is not an error.
+            var contentElement = document.createElement("div");
+            contentElement.className = "panel-enabler-view-content";
+            fileSystemElement.appendChild(contentElement);
+            var choicesForm = document.createElement("form");
+            contentElement.appendChild(choicesForm);
+            var enableButton = document.createElement("button");
+            enableButton.setAttribute("type", "button");
+            enableButton.textContent = WebInspector.UIString("Reveal folder in OS");
+            // FIXME: Bind this directly to InspectorBackend.
+            if (type == WebInspector.FileSystem.PERSISTENT)
+                enableButton.addEventListener("click", this._revealPersistentFolderInOS.bind(this), false);
+            if (type == WebInspector.FileSystem.TEMPORARY)
+                enableButton.addEventListener("click", 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;
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
index 3fb81f5..7d14100 100644
--- a/WebCore/inspector/front-end/Settings.js
+++ b/WebCore/inspector/front-end/Settings.js
@@ -46,6 +46,7 @@ var Preferences = {
     nativeInstrumentationEnabled: false,
     resourceExportEnabled: false,
     networkPanelEnabled: false,
+    fileSystemEnabled: false,
     useDataURLForResourceImageIcons: true
 }
 
diff --git a/WebCore/inspector/front-end/StoragePanel.js b/WebCore/inspector/front-end/StoragePanel.js
index 2fa54c2..d19e4e6 100644
--- a/WebCore/inspector/front-end/StoragePanel.js
+++ b/WebCore/inspector/front-end/StoragePanel.js
@@ -62,6 +62,12 @@ WebInspector.StoragePanel = function(database)
     this.sidebarTree.appendChild(this.applicationCacheListTreeElement);
     this.applicationCacheListTreeElement.expand();
 
+    if (Preferences.fileSystemEnabled) {
+        this.fileSystemListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("File System"), "file-system-storage-tree-item");
+        this.sidebarTree.appendChild(this.fileSystemListTreeElement);
+        this.fileSystemListTreeElement.expand();
+    }
+       
     this.storageViews = document.createElement("div");
     this.storageViews.id = "storage-views";
     this.element.appendChild(this.storageViews);
@@ -102,7 +108,9 @@ WebInspector.StoragePanel.prototype = {
         this._domStorage = [];
 
         this._cookieViews = {};
-
+        
+        this._fileSystemView = null;
+        
         this._applicationCacheView = null;
         delete this._cachedApplicationCacheViewStatus;
 
@@ -111,7 +119,8 @@ WebInspector.StoragePanel.prototype = {
         this.sessionStorageListTreeElement.removeChildren();
         this.cookieListTreeElement.removeChildren();
         this.applicationCacheListTreeElement.removeChildren();
-
+        if (Preferences.fileSystemEnabled)
+            this.fileSystemListTreeElement.removeChildren();
         this.storageViews.removeChildren();
 
         this.storageViewStatusBarItemsContainer.removeChildren();
@@ -229,6 +238,12 @@ WebInspector.StoragePanel.prototype = {
         this.applicationCacheListTreeElement.appendChild(applicationCacheTreeElement);
     },
 
+    addFileSystem: function(origin)
+    {
+        var fileSystemTreeElement = new WebInspector.FileSystemTreeElement(this, origin);
+        this.fileSystemListTreeElement.appendChild(fileSystemTreeElement);
+    },
+    
     selectDatabase: function(databaseId)
     {
         var database;
@@ -352,6 +367,12 @@ WebInspector.StoragePanel.prototype = {
             this._applicationCacheView.updateStatus(this._cachedApplicationCacheViewStatus);
     },
 
+    showFileSystem: function(treeElement, fileSystemDomain)
+    {
+        this._fileSystemView =  new WebInspector.FileSystemView(treeElement, fileSystemDomain);
+        this._innerShowView(this._fileSystemView);
+    },
+    
     showCategoryView: function(categoryName)
     {
         if (!this._categoryView)
@@ -500,6 +521,18 @@ WebInspector.StoragePanel.prototype = {
             this._applicationCacheView.updateStatus(status);
     },
 
+    updateFileSystemPath: function(root, type, origin)
+    {
+        if (this._fileSystemView && this._fileSystemView === this.visibleView)
+            this._fileSystemView.updateFileSystemPath(root, type, origin);  
+    },
+  
+    updateFileSystemError: function(type, origin)
+    {
+        if (this._fileSystemView && this._fileSystemView === this.visibleView)
+            this._fileSystemView.updateFileSystemError(type, origin);  
+    },
+
     updateNetworkState: function(isNowOnline)
     {
         if (this._applicationCacheView && this._applicationCacheView === this.visibleView)
@@ -921,6 +954,21 @@ WebInspector.ApplicationCacheTreeElement.prototype = {
 }
 WebInspector.ApplicationCacheTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
 
+WebInspector.FileSystemTreeElement = function(storagePanel, fileSystemDomain)
+{
+    WebInspector.BaseStorageTreeElement.call(this, storagePanel, null, fileSystemDomain ? fileSystemDomain : WebInspector.UIString("Local Files"), "file-system-storage-tree-item");
+    this._fileSystemDomain = fileSystemDomain;
+}
+
+WebInspector.FileSystemTreeElement.prototype = {
+    onselect: function()
+    {
+        this._storagePanel.showFileSystem(this, this._fileSystemDomain);
+    }
+}
+ 
+WebInspector.FileSystemTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
+ 
 WebInspector.StorageCategoryView = function()
 {
     WebInspector.View.call(this);
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index 481f8b3..0c7a735 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -41,6 +41,7 @@
     <file>ExtensionPanel.js</file>
     <file>ExtensionRegistryStub.js</file>
     <file>ExtensionServer.js</file>
+    <file>FileSystemView.js</file>
     <file>FontView.js</file>
     <file>GoToLineDialog.js</file>
     <file>HAREntry.js</file>
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 429e749..0f551ea 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -1932,6 +1932,11 @@ body.inactive .sidebar {
     content: url(Images/applicationCache.png);
 }
 
+/* FIXME: Make separate png for file-system */
+.file-system-storage-tree-item .icon {
+    content: url(Images/applicationCache.png);
+}
+
 #storage-views {
     position: absolute;
     top: 0;
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index 96d0cfe..93e61c7 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -69,6 +69,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <script type="text/javascript" src="DataGrid.js"></script>
     <script type="text/javascript" src="CookieItemsView.js"></script>
     <script type="text/javascript" src="ApplicationCacheItemsView.js"></script>
+    <script type="text/javascript" src="FileSystemView.js"></script>
     <script type="text/javascript" src="Script.js"></script>
     <script type="text/javascript" src="BreakpointManager.js"></script>
     <script type="text/javascript" src="SidebarPane.js"></script>
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index f5a70c8..ef5239c 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -52,6 +52,7 @@ var WebInspector = {
     resources: {},
     cookieDomains: {},
     applicationCacheDomains: {},
+    fileSystemOrigins: {},
     missingLocalizedStrings: {},
     pendingDispatches: 0,
 
@@ -1297,6 +1298,9 @@ WebInspector.updateResource = function(payload)
         if (parsedURL) {
             this._addCookieDomain(parsedURL.host);
             this._addAppCacheDomain(parsedURL.host);
+            if (Preferences.fileSystemEnabled)
+                // This should match the SecurityOrigin::toString(). FIXME: Add a test for this.
+                this._addFileSystemOrigin(parsedURL.scheme + "://" + parsedURL.host + (parsedURL.port ? (":" + parsedURL.port) : ""));
         }
     }
 
@@ -1413,6 +1417,18 @@ WebInspector._addAppCacheDomain = function(domain)
     this.panels.storage.addApplicationCache(domain);
 }
 
+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);
+}
+
 WebInspector.addDOMStorage = function(payload)
 {
     if (!this.panels.storage)
@@ -1434,6 +1450,16 @@ WebInspector.updateApplicationCacheStatus = function(status)
     this.panels.storage.updateApplicationCacheStatus(status);
 }
 
+WebInspector.didGetFileSystemPath = function(root, type, origin)
+{
+    this.panels.storage.updateFileSystemPath(root, type, origin);
+}
+
+WebInspector.didGetFileSystemError = function(type, origin)
+{
+    this.panels.storage.updateFileSystemError(type, origin);
+}
+
 WebInspector.updateNetworkState = function(isNowOnline)
 {
     this.panels.storage.updateNetworkState(isNowOnline);
@@ -1515,6 +1541,7 @@ WebInspector.reset = function()
     this.resources = {};
     this.cookieDomains = {};
     this.applicationCacheDomains = {};
+    this.fileSystemOrigins = {};
     this.highlightDOMNode(0);
 
     if (!Preferences.networkPanelEnabled)
diff --git a/WebCore/platform/AsyncFileSystem.h b/WebCore/platform/AsyncFileSystem.h
index 3104ebc..6eb863f 100644
--- a/WebCore/platform/AsyncFileSystem.h
+++ b/WebCore/platform/AsyncFileSystem.h
@@ -128,6 +128,9 @@ public:
     // Converts a given absolute virtual path to a platform path that starts with the platform root path of this file system.
     virtual String virtualToPlatformPath(const String& path) const;
 
+    // Getter for this file system's root path.
+    String root() const { return m_platformRootPath; }
+
 protected:
     AsyncFileSystem(const String& platformRootPath)
         : m_platformRootPath(platformRootPath)
diff --git a/WebCore/platform/FileSystem.h b/WebCore/platform/FileSystem.h
index e3916cf..32ab417 100644
--- a/WebCore/platform/FileSystem.h
+++ b/WebCore/platform/FileSystem.h
@@ -144,6 +144,7 @@ static const char PlatformFilePathSeparator = '\\';
 static const char PlatformFilePathSeparator = '/';
 #endif
 
+void revealFolderInOS(const String&);
 bool fileExists(const String&);
 bool deleteFile(const String&);
 bool deleteEmptyDirectory(const String&);
diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h
index 74bad04..55a4ce0 100644
--- a/WebCore/platform/chromium/ChromiumBridge.h
+++ b/WebCore/platform/chromium/ChromiumBridge.h
@@ -121,6 +121,7 @@ namespace WebCore {
         static void prefetchDNS(const String& hostname);
 
         // File ---------------------------------------------------------------
+        static void revealFolderInOS(const String&);
         static bool fileExists(const String&);
         static bool deleteFile(const String&);
         static bool deleteEmptyDirectory(const String&);
diff --git a/WebCore/platform/chromium/FileSystemChromium.cpp b/WebCore/platform/chromium/FileSystemChromium.cpp
index 975caf6..d8a1e3f 100644
--- a/WebCore/platform/chromium/FileSystemChromium.cpp
+++ b/WebCore/platform/chromium/FileSystemChromium.cpp
@@ -57,6 +57,11 @@ bool getFileModificationTime(const String& path, time_t& result)
     return ChromiumBridge::getFileModificationTime(path, result);
 }
 
+void revealFolderInOS(const String& path)
+{
+    ChromiumBridge::revealFolderInOS(path);
+}
+
 String directoryName(const String& path)
 {
     return ChromiumBridge::directoryName(path);
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 9eeb48b..791682e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-29  Kavita Kanetkar  <kkanetkar at chromium.org>
+
+        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):
+
+
 2010-10-29  Darin Adler  <darin at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebKit/chromium/public/WebFileUtilities.h b/WebKit/chromium/public/WebFileUtilities.h
index 456ba69..c8876f2 100644
--- a/WebKit/chromium/public/WebFileUtilities.h
+++ b/WebKit/chromium/public/WebFileUtilities.h
@@ -48,7 +48,7 @@ public:
 #else
     typedef int FileHandle;
 #endif
-
+    virtual void revealFolderInOS(const WebString& path) { }
     virtual bool fileExists(const WebString& path) { return false; }
     virtual bool deleteFile(const WebString& path) { return false; }
     virtual bool deleteEmptyDirectory(const WebString& path) { return false; }
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 1af32cf..39d2566 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -345,6 +345,11 @@ bool ChromiumBridge::getFileSize(const String& path, long long& result)
     return webKitClient()->fileUtilities()->getFileSize(path, result);
 }
 
+void ChromiumBridge::revealFolderInOS(const String& path)
+{
+    webKitClient()->fileUtilities()->revealFolderInOS(path);
+}
+
 bool ChromiumBridge::getFileModificationTime(const String& path, time_t& result)
 {
     double modificationTime;
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 4c23057..74b6bd9 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -46,6 +46,8 @@ var context = {};  // Used by WebCore's inspector routines.
     Preferences.canEditScriptSource = true;
     Preferences.onlineDetectionEnabled = false;
     Preferences.nativeInstrumentationEnabled = true;
+    // FIXME: Turn this to whatever the value of --enable-file-system for chrome.
+    Preferences.fileSystemEnabled = false;
 })();
 
 var devtools = devtools || {};

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list