OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 5 #ifndef CONTENT_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
6 #define CONTENT_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 6 #define CONTENT_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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 class FilePath; | 24 class FilePath; |
25 class GURL; | 25 class GURL; |
26 | 26 |
27 // Dispatches and sends file system related messages sent to/from a child | 27 // Dispatches and sends file system related messages sent to/from a child |
28 // process from/to the main browser process. There is one instance | 28 // process from/to the main browser process. There is one instance |
29 // per child process. Messages are dispatched on the main child thread. | 29 // per child process. Messages are dispatched on the main child thread. |
30 class FileSystemDispatcher : public IPC::Channel::Listener { | 30 class FileSystemDispatcher : public IPC::Channel::Listener { |
31 public: | 31 public: |
32 FileSystemDispatcher(); | 32 FileSystemDispatcher(); |
33 ~FileSystemDispatcher(); | 33 virtual ~FileSystemDispatcher(); |
34 | 34 |
35 // IPC::Channel::Listener implementation. | 35 // IPC::Channel::Listener implementation. |
36 virtual bool OnMessageReceived(const IPC::Message& msg); | 36 virtual bool OnMessageReceived(const IPC::Message& msg); |
37 | 37 |
38 bool OpenFileSystem(const GURL& origin_url, | 38 bool OpenFileSystem(const GURL& origin_url, |
39 fileapi::FileSystemType type, | 39 fileapi::FileSystemType type, |
40 long long size, | 40 long long size, |
41 bool create, | 41 bool create, |
42 fileapi::FileSystemCallbackDispatcher* dispatcher); | 42 fileapi::FileSystemCallbackDispatcher* dispatcher); |
43 bool Move(const GURL& src_path, | 43 bool Move(const GURL& src_path, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void OnDidOpenFile( | 102 void OnDidOpenFile( |
103 int request_id, | 103 int request_id, |
104 IPC::PlatformFileForTransit file); | 104 IPC::PlatformFileForTransit file); |
105 | 105 |
106 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; | 106 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); | 108 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); |
109 }; | 109 }; |
110 | 110 |
111 #endif // CONTENT_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 111 #endif // CONTENT_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
OLD | NEW |