OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_CONTEXT_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_CONTEXT_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_CONTEXT_H_ |
7 | 7 |
8 // Manages isolated filesystem namespaces for media file systems. | 8 // Manages isolated filesystem namespaces for media file systems. |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "chrome/browser/media_galleries/scoped_mtp_device_map_entry.h" | 13 #include "chrome/browser/media_galleries/scoped_mtp_device_map_entry.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class FilePath; | 16 class FilePath; |
17 } | 17 } |
18 | 18 |
19 namespace chrome { | |
20 | |
21 class MediaFileSystemRegistry; | 19 class MediaFileSystemRegistry; |
22 | 20 |
23 class MediaFileSystemContext { | 21 class MediaFileSystemContext { |
24 public: | 22 public: |
25 virtual ~MediaFileSystemContext() {} | 23 virtual ~MediaFileSystemContext() {} |
26 | 24 |
27 // Register a media file system (filtered to media files) for |path| and | 25 // Register a media file system (filtered to media files) for |path| and |
28 // return the new file system id. | 26 // return the new file system id. |
29 virtual std::string RegisterFileSystemForMassStorage( | 27 virtual std::string RegisterFileSystemForMassStorage( |
30 const std::string& device_id, const base::FilePath& path) = 0; | 28 const std::string& device_id, const base::FilePath& path) = 0; |
31 | 29 |
32 // Registers and returns the file system id for the MTP or PTP device | 30 // Registers and returns the file system id for the MTP or PTP device |
33 // specified by |device_id| and |path|. Updates |entry| with the corresponding | 31 // specified by |device_id| and |path|. Updates |entry| with the corresponding |
34 // ScopedMTPDeviceMapEntry object. | 32 // ScopedMTPDeviceMapEntry object. |
35 virtual std::string RegisterFileSystemForMTPDevice( | 33 virtual std::string RegisterFileSystemForMTPDevice( |
36 const std::string& device_id, const base::FilePath& path, | 34 const std::string& device_id, const base::FilePath& path, |
37 scoped_refptr<ScopedMTPDeviceMapEntry>* entry) = 0; | 35 scoped_refptr<ScopedMTPDeviceMapEntry>* entry) = 0; |
38 | 36 |
39 // Revoke the passed |fsid|. | 37 // Revoke the passed |fsid|. |
40 virtual void RevokeFileSystem(const std::string& fsid) = 0; | 38 virtual void RevokeFileSystem(const std::string& fsid) = 0; |
41 }; | 39 }; |
42 | 40 |
43 } // namespace | |
44 | |
45 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_CONTEXT_H_ | 41 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_CONTEXT_H_ |
OLD | NEW |