| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 5 #ifndef CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
| 6 #define CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 6 #define CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/id_map.h" | 11 #include "base/id_map.h" |
| 12 #include "base/nullable_string16.h" | 12 #include "base/nullable_string16.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "ipc/ipc_channel.h" | 14 #include "ipc/ipc_channel.h" |
| 15 #include "ipc/ipc_message.h" | 15 #include "ipc/ipc_message.h" |
| 16 #include "third_party/WebKit/WebKit/chromium/public/WebFileError.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebFileError.h" |
| 17 | 17 |
| 18 namespace WebKit { | 18 namespace WebKit { |
| 19 struct WebFileInfo; | 19 struct WebFileInfo; |
| 20 class WebFileSystemCallbacks; | 20 class WebFileSystemCallbacks; |
| 21 struct WebFileSystemEntry; | 21 struct WebFileSystemEntry; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace file_util { | 24 namespace base { |
| 25 struct FileInfo; | 25 struct PlatformFileInfo; |
| 26 } | 26 } |
| 27 | 27 |
| 28 struct ViewMsg_FileSystem_DidReadDirectory_Params; | 28 struct ViewMsg_FileSystem_DidReadDirectory_Params; |
| 29 | 29 |
| 30 // Dispatches and sends file system related messages sent to/from a child | 30 // Dispatches and sends file system related messages sent to/from a child |
| 31 // process from/to the main browser process. There is one instance | 31 // process from/to the main browser process. There is one instance |
| 32 // per child process. Messages are dispatched on the main child thread. | 32 // per child process. Messages are dispatched on the main child thread. |
| 33 class FileSystemDispatcher { | 33 class FileSystemDispatcher { |
| 34 public: | 34 public: |
| 35 FileSystemDispatcher(); | 35 FileSystemDispatcher(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 61 bool for_directory, | 61 bool for_directory, |
| 62 WebKit::WebFileSystemCallbacks* callbacks); | 62 WebKit::WebFileSystemCallbacks* callbacks); |
| 63 void ReadDirectory( | 63 void ReadDirectory( |
| 64 const string16& path, | 64 const string16& path, |
| 65 WebKit::WebFileSystemCallbacks* callbacks); | 65 WebKit::WebFileSystemCallbacks* callbacks); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 void DidSucceed(int request_id); | 68 void DidSucceed(int request_id); |
| 69 void DidReadMetadata( | 69 void DidReadMetadata( |
| 70 int request_id, | 70 int request_id, |
| 71 const file_util::FileInfo& file_info); | 71 const base::PlatformFileInfo& file_info); |
| 72 void DidReadDirectory( | 72 void DidReadDirectory( |
| 73 const ViewMsg_FileSystem_DidReadDirectory_Params& params); | 73 const ViewMsg_FileSystem_DidReadDirectory_Params& params); |
| 74 void DidFail( | 74 void DidFail( |
| 75 int request_id, | 75 int request_id, |
| 76 WebKit::WebFileError); | 76 WebKit::WebFileError); |
| 77 | 77 |
| 78 IDMap<WebKit::WebFileSystemCallbacks> callbacks_; | 78 IDMap<WebKit::WebFileSystemCallbacks> callbacks_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); | 80 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 #endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 83 #endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
| OLD | NEW |