diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-08 05:05:28 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-08 05:05:28 +0000 |
commit | 7ef40ffe187f831fa843159744cd3365fc29ac71 (patch) | |
tree | 1d34dcc419411bccb0766d05542d21636a2ebfe6 /chrome/common/file_system/file_system_dispatcher.h | |
parent | e0549cec57a557495914d246cf21a95e69fe5ae1 (diff) | |
download | chromium_src-7ef40ffe187f831fa843159744cd3365fc29ac71.zip chromium_src-7ef40ffe187f831fa843159744cd3365fc29ac71.tar.gz chromium_src-7ef40ffe187f831fa843159744cd3365fc29ac71.tar.bz2 |
Move ChildThread and ChildProcess to content. Also move remaining code that they depend on and which depends on them.TBR=avi
Review URL: http://codereview.chromium.org/6628071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77249 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/file_system/file_system_dispatcher.h')
-rw-r--r-- | chrome/common/file_system/file_system_dispatcher.h | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/chrome/common/file_system/file_system_dispatcher.h b/chrome/common/file_system/file_system_dispatcher.h deleted file mode 100644 index 65e1a6d..0000000 --- a/chrome/common/file_system/file_system_dispatcher.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2010 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 CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ -#define CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ - -#include <vector> - -#include "base/basictypes.h" -#include "base/file_util_proxy.h" -#include "base/id_map.h" -#include "ipc/ipc_channel.h" -#include "ipc/ipc_message.h" -#include "webkit/fileapi/file_system_callback_dispatcher.h" -#include "webkit/fileapi/file_system_types.h" - -namespace base { -struct PlatformFileInfo; -} - -class FilePath; -class GURL; - -// Dispatches and sends file system related messages sent to/from a child -// process from/to the main browser process. There is one instance -// per child process. Messages are dispatched on the main child thread. -class FileSystemDispatcher : public IPC::Channel::Listener { - public: - FileSystemDispatcher(); - ~FileSystemDispatcher(); - - // IPC::Channel::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& msg); - - bool OpenFileSystem(const GURL& origin_url, - fileapi::FileSystemType type, - long long size, - bool create, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Move(const FilePath& src_path, - const FilePath& dest_path, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Copy(const FilePath& src_path, - const FilePath& dest_path, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Remove(const FilePath& path, - bool recursive, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool ReadMetadata(const FilePath& path, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Create(const FilePath& path, - bool exclusive, - bool is_directory, - bool recursive, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Exists(const FilePath& path, - bool for_directory, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool ReadDirectory(const FilePath& path, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Truncate(const FilePath& path, - int64 offset, - int* request_id_out, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Write(const FilePath& path, - const GURL& blob_url, - int64 offset, - int* request_id_out, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Cancel(int request_id_to_cancel, - fileapi::FileSystemCallbackDispatcher* dispatcher); - bool TouchFile(const FilePath& file_path, - const base::Time& last_access_time, - const base::Time& last_modified_time, - fileapi::FileSystemCallbackDispatcher* dispatcher); - - private: - // Message handlers. - void OnOpenComplete( - int request_id, - bool accepted, - const std::string& name, - const FilePath& root_path); - void OnDidSucceed(int request_id); - void OnDidReadMetadata(int request_id, - const base::PlatformFileInfo& file_info); - void OnDidReadDirectory( - int request_id, - const std::vector<base::FileUtilProxy::Entry>& entries, - bool has_more); - void OnDidFail(int request_id, base::PlatformFileError error_code); - void OnDidWrite(int request_id, int64 bytes, bool complete); - - IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; - - DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); -}; - -#endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |