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" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 int* request_id_out, | 69 int* request_id_out, |
70 fileapi::FileSystemCallbackDispatcher* dispatcher); | 70 fileapi::FileSystemCallbackDispatcher* dispatcher); |
71 bool Cancel(int request_id_to_cancel, | 71 bool Cancel(int request_id_to_cancel, |
72 fileapi::FileSystemCallbackDispatcher* dispatcher); | 72 fileapi::FileSystemCallbackDispatcher* dispatcher); |
73 bool TouchFile(const FilePath& file_path, | 73 bool TouchFile(const FilePath& file_path, |
74 const base::Time& last_access_time, | 74 const base::Time& last_access_time, |
75 const base::Time& last_modified_time, | 75 const base::Time& last_modified_time, |
76 fileapi::FileSystemCallbackDispatcher* dispatcher); | 76 fileapi::FileSystemCallbackDispatcher* dispatcher); |
77 | 77 |
78 private: | 78 private: |
79 // Message handler for OpenFileSystem. | 79 // Message handlers. |
80 void OnOpenFileSystemRequestComplete( | 80 void OnOpenComplete( |
81 int request_id, | 81 int request_id, |
82 bool accepted, | 82 bool accepted, |
83 const std::string& name, | 83 const std::string& name, |
84 const FilePath& root_path); | 84 const FilePath& root_path); |
85 | 85 void OnDidSucceed(int request_id); |
86 // Message handlers for regular file system operations. | 86 void OnDidReadMetadata(int request_id, |
87 void DidSucceed(int request_id); | 87 const base::PlatformFileInfo& file_info); |
88 void DidReadMetadata(int request_id, | 88 void OnDidReadDirectory( |
89 const base::PlatformFileInfo& file_info); | |
90 void DidReadDirectory( | |
91 int request_id, | 89 int request_id, |
92 const std::vector<base::FileUtilProxy::Entry>& entries, | 90 const std::vector<base::FileUtilProxy::Entry>& entries, |
93 bool has_more); | 91 bool has_more); |
94 void DidFail(int request_id, base::PlatformFileError error_code); | 92 void OnDidFail(int request_id, base::PlatformFileError error_code); |
95 void DidWrite(int request_id, int64 bytes, bool complete); | 93 void OnDidWrite(int request_id, int64 bytes, bool complete); |
96 | 94 |
97 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; | 95 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; |
98 | 96 |
99 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); | 97 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); |
100 }; | 98 }; |
101 | 99 |
102 #endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 100 #endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
OLD | NEW |