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

Side by Side Diff: chrome/browser/file_system/file_system_dispatcher_host.h

Issue 3394003: Add Worker support for FileSystem API. (Closed)
Patch Set: '' Created 10 years, 3 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 unified diff | Download patch
OLDNEW
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_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 5 #ifndef CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
6 #define CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 6 #define CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/id_map.h" 10 #include "base/id_map.h"
11 #include "base/nullable_string16.h" 11 #include "base/nullable_string16.h"
12 #include "base/process.h" 12 #include "base/process.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "base/scoped_callback_factory.h" 14 #include "base/scoped_callback_factory.h"
15 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
16 #include "chrome/common/render_messages.h" 16 #include "ipc/ipc_message.h"
17 #include "webkit/fileapi/file_system_operation.h" 17 #include "webkit/fileapi/file_system_operation.h"
18 #include "webkit/fileapi/file_system_types.h"
18 19
20 class ChromeFileSystemOperation;
19 class FileSystemHostContext; 21 class FileSystemHostContext;
22 class GURL;
20 class HostContentSettingsMap; 23 class HostContentSettingsMap;
21 class Receiver; 24 class Receiver;
22 class ResourceMessageFilter; 25 class ResourceMessageFilter;
23 26
24 class FileSystemDispatcherHost 27 class FileSystemDispatcherHost
25 : public base::RefCountedThreadSafe<FileSystemDispatcherHost> { 28 : public base::RefCountedThreadSafe<FileSystemDispatcherHost> {
26 public: 29 public:
27 FileSystemDispatcherHost(IPC::Message::Sender* sender, 30 FileSystemDispatcherHost(IPC::Message::Sender* sender,
28 FileSystemHostContext* file_system_host_context, 31 FileSystemHostContext* file_system_host_context,
29 HostContentSettingsMap* host_content_settings_map); 32 HostContentSettingsMap* host_content_settings_map);
30 ~FileSystemDispatcherHost(); 33 ~FileSystemDispatcherHost();
31 void Init(base::ProcessHandle process_handle); 34 void Init(base::ProcessHandle process_handle);
32 void Shutdown(); 35 void Shutdown();
33 36
34 bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); 37 bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok);
35 38
36 void OnOpenFileSystem(const ViewHostMsg_OpenFileSystemRequest_Params&); 39 void OnOpenFileSystem(int request_id,
40 const GURL& origin_url,
41 fileapi::FileSystemType type,
42 int64 requested_size);
37 void OnMove(int request_id, 43 void OnMove(int request_id,
38 const FilePath& src_path, 44 const FilePath& src_path,
39 const FilePath& dest_path); 45 const FilePath& dest_path);
40 void OnCopy(int request_id, 46 void OnCopy(int request_id,
41 const FilePath& src_path, 47 const FilePath& src_path,
42 const FilePath& dest_path); 48 const FilePath& dest_path);
43 void OnRemove(int request_id, const FilePath& path); 49 void OnRemove(int request_id, const FilePath& path);
44 void OnReadMetadata(int request_id, const FilePath& path); 50 void OnReadMetadata(int request_id, const FilePath& path);
45 void OnCreate(int request_id, 51 void OnCreate(int request_id,
46 const FilePath& path, 52 const FilePath& path,
(...skipping 28 matching lines...) Expand all
75 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 81 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
76 82
77 // Keeps ongoing file system operations. 83 // Keeps ongoing file system operations.
78 typedef IDMap<fileapi::FileSystemOperation, IDMapOwnPointer> OperationsMap; 84 typedef IDMap<fileapi::FileSystemOperation, IDMapOwnPointer> OperationsMap;
79 OperationsMap operations_; 85 OperationsMap operations_;
80 86
81 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost); 87 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost);
82 }; 88 };
83 89
84 #endif // CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 90 #endif // CHROME_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698