Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: webkit/tools/test_shell/simple_file_system.h

Issue 15946006: Move C++ code from webkit/tools/test_shell to webkit/support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix npapi_test_plugin Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/simple_dom_storage_system.cc ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_file_system.h
diff --git a/webkit/tools/test_shell/simple_file_system.h b/webkit/tools/test_shell/simple_file_system.h
deleted file mode 100644
index 464c59121cf78757301673f6b03b7add024d17be..0000000000000000000000000000000000000000
--- a/webkit/tools/test_shell/simple_file_system.h
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_
-#define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_
-
-#include <vector>
-
-#include "base/files/scoped_temp_dir.h"
-#include "base/id_map.h"
-#include "base/memory/weak_ptr.h"
-#include "third_party/WebKit/public/platform/WebFileSystem.h"
-#include "third_party/WebKit/public/platform/WebFileSystemType.h"
-#include "webkit/browser/fileapi/file_system_context.h"
-#include "webkit/browser/fileapi/file_system_operation.h"
-#include "webkit/common/fileapi/file_system_types.h"
-
-namespace WebKit {
-class WebFileSystemCallbacks;
-class WebFrame;
-class WebURL;
-}
-
-namespace fileapi {
-class FileSystemContext;
-class FileSystemURL;
-}
-
-namespace webkit_blob {
-class BlobStorageController;
-}
-
-class SimpleFileSystem
- : public WebKit::WebFileSystem,
- public base::SupportsWeakPtr<SimpleFileSystem> {
- public:
- SimpleFileSystem();
- virtual ~SimpleFileSystem();
-
- void OpenFileSystem(WebKit::WebFrame* frame,
- WebKit::WebFileSystemType type,
- long long size,
- bool create,
- WebKit::WebFileSystemCallbacks* callbacks);
- void DeleteFileSystem(WebKit::WebFrame* frame,
- WebKit::WebFileSystemType type,
- WebKit::WebFileSystemCallbacks* callbacks);
-
- fileapi::FileSystemContext* file_system_context() {
- return file_system_context_.get();
- }
-
- // WebKit::WebFileSystem implementation.
- virtual void move(
- const WebKit::WebURL& src_path,
- const WebKit::WebURL& dest_path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void copy(
- const WebKit::WebURL& src_path,
- const WebKit::WebURL& dest_path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void remove(
- const WebKit::WebURL& path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void removeRecursively(
- const WebKit::WebURL& path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void readMetadata(
- const WebKit::WebURL& path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void createFile(
- const WebKit::WebURL& path,
- bool exclusive,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void createDirectory(
- const WebKit::WebURL& path,
- bool exclusive,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void fileExists(
- const WebKit::WebURL& path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void directoryExists(
- const WebKit::WebURL& path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual void readDirectory(
- const WebKit::WebURL& path,
- WebKit::WebFileSystemCallbacks*) OVERRIDE;
- virtual WebKit::WebFileWriter* createFileWriter(
- const WebKit::WebURL& path, WebKit::WebFileWriterClient*) OVERRIDE;
- virtual void createSnapshotFileAndReadMetadata(
- const WebKit::WebURL& path,
- WebKit::WebFileSystemCallbacks* callbacks);
-
- static void InitializeOnIOThread(
- webkit_blob::BlobStorageController* blob_storage_controller);
- static void CleanupOnIOThread();
-
- private:
- // Helpers.
- bool HasFilePermission(const fileapi::FileSystemURL& url, int permissions);
- fileapi::FileSystemOperation* GetNewOperation(
- const fileapi::FileSystemURL& url);
-
- // Callback Handlers
- fileapi::FileSystemOperation::StatusCallback FinishHandler(
- WebKit::WebFileSystemCallbacks* callbacks);
- fileapi::FileSystemOperation::GetMetadataCallback GetMetadataHandler(
- WebKit::WebFileSystemCallbacks* callbacks);
- fileapi::FileSystemOperation::ReadDirectoryCallback
- ReadDirectoryHandler(WebKit::WebFileSystemCallbacks* callbacks);
- fileapi::FileSystemContext::OpenFileSystemCallback OpenFileSystemHandler(
- WebKit::WebFileSystemCallbacks* callbacks);
- fileapi::FileSystemContext::DeleteFileSystemCallback DeleteFileSystemHandler(
- WebKit::WebFileSystemCallbacks* callbacks);
- fileapi::FileSystemOperation::SnapshotFileCallback
- SnapshotFileHandler(WebKit::WebFileSystemCallbacks* callbacks);
- fileapi::FileSystemOperation::SnapshotFileCallback
- SnapshotFileHandler_Deprecated(
- const GURL& blob_url,
- WebKit::WebFileSystemCallbacks* callbacks);
- void DidFinish(WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError result);
- void DidGetMetadata(WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError result,
- const base::PlatformFileInfo& info,
- const base::FilePath& platform_path);
- void DidReadDirectory(
- WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError result,
- const std::vector<fileapi::DirectoryEntry>& entries,
- bool has_more);
- void DidOpenFileSystem(WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError result,
- const std::string& name, const GURL& root);
- void DidDeleteFileSystem(WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError result);
- void DidCreateSnapshotFile(
- WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError result,
- const base::PlatformFileInfo& info,
- const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
- void DidCreateSnapshotFile_Deprecated(
- const GURL& blob_url,
- WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError result,
- const base::PlatformFileInfo& info,
- const base::FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
-
- // A temporary directory for FileSystem API.
- base::ScopedTempDir file_system_dir_;
-
- scoped_refptr<fileapi::FileSystemContext> file_system_context_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleFileSystem);
-};
-
-#endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_
« no previous file with comments | « webkit/tools/test_shell/simple_dom_storage_system.cc ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698