diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-25 19:44:49 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-25 19:44:49 +0000 |
commit | 52785d4c507c7c1f997d8bac300d0e9c13ac6391 (patch) | |
tree | ccf53ad81ffece1e3c036661e41e4e7befc0ceed /chrome/common/file_system/file_system_dispatcher.h | |
parent | 7c9ae8ce124cf730b0ef45b43a3b0bba8d284998 (diff) | |
download | chromium_src-52785d4c507c7c1f997d8bac300d0e9c13ac6391.zip chromium_src-52785d4c507c7c1f997d8bac300d0e9c13ac6391.tar.gz chromium_src-52785d4c507c7c1f997d8bac300d0e9c13ac6391.tar.bz2 |
Add WebFileSystemImpl and 2nd cut of IPC plumbing code for Move operation.
Plumbing code for the remaining operations (Copy, Remove etc) will come later in a separate patch once this one becomes to look good.
BUG=32277
TESTS=none, will be added later
Review URL: http://codereview.chromium.org/3165040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57365 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 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/chrome/common/file_system/file_system_dispatcher.h b/chrome/common/file_system/file_system_dispatcher.h new file mode 100644 index 0000000..5c854c2 --- /dev/null +++ b/chrome/common/file_system/file_system_dispatcher.h @@ -0,0 +1,48 @@ +// 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/id_map.h" +#include "base/nullable_string16.h" +#include "googleurl/src/gurl.h" +#include "ipc/ipc_channel.h" +#include "ipc/ipc_message.h" + +namespace WebKit { +class WebFileSystemCallbacks; +} + +// 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: + FileSystemDispatcher(); + ~FileSystemDispatcher(); + + bool OnMessageReceived(const IPC::Message& msg); + + void Move( + const string16& src_path, + const string16& dest_path, + WebKit::WebFileSystemCallbacks* callbacks); + + // TODO(kinuko): add more implementation. + + private: + void DidSucceed(int32 callbacks_id); + void DidFail(int32 callbacks_id, int code); + // TODO(kinuko): add more callbacks. + + IDMap<WebKit::WebFileSystemCallbacks> callbacks_; + + DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); +}; + +#endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |