| 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 WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_ | 5 #ifndef WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_ |
| 6 #define WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_ | 6 #define WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
| 14 #include "webkit/fileapi/fileapi_export.h" | 14 #include "webkit/storage/webkit_storage_export.h" |
| 15 | 15 |
| 16 namespace fileapi { | 16 namespace fileapi { |
| 17 | 17 |
| 18 class MtpDeviceDelegate; | 18 class MtpDeviceDelegate; |
| 19 | 19 |
| 20 // Helper class to manage media device delegates which can communicate with mtp | 20 // Helper class to manage media device delegates which can communicate with mtp |
| 21 // devices to complete media file system operations. | 21 // devices to complete media file system operations. |
| 22 class FILEAPI_EXPORT MtpDeviceMapService { | 22 class WEBKIT_STORAGE_EXPORT MtpDeviceMapService { |
| 23 public: | 23 public: |
| 24 static MtpDeviceMapService* GetInstance(); | 24 static MtpDeviceMapService* GetInstance(); |
| 25 | 25 |
| 26 // Adds the media device delegate for the given |device_location|. Called on | 26 // Adds the media device delegate for the given |device_location|. Called on |
| 27 // IO thread. | 27 // IO thread. |
| 28 void AddDelegate(const FilePath::StringType& device_location, | 28 void AddDelegate(const FilePath::StringType& device_location, |
| 29 scoped_refptr<MtpDeviceDelegate> delegate); | 29 scoped_refptr<MtpDeviceDelegate> delegate); |
| 30 | 30 |
| 31 // Removes the media device delegate for the given |device_location| if | 31 // Removes the media device delegate for the given |device_location| if |
| 32 // exists. Called on IO thread. | 32 // exists. Called on IO thread. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 55 // Stores a |thread_checker_| object to verify all methods of this class are | 55 // Stores a |thread_checker_| object to verify all methods of this class are |
| 56 // called on same thread. | 56 // called on same thread. |
| 57 base::ThreadChecker thread_checker_; | 57 base::ThreadChecker thread_checker_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(MtpDeviceMapService); | 59 DISALLOW_COPY_AND_ASSIGN(MtpDeviceMapService); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace fileapi | 62 } // namespace fileapi |
| 63 | 63 |
| 64 #endif // WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_ | 64 #endif // WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_ |
| OLD | NEW |