OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FILEAPI_IPHOTO_DATA_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_DATA_PROVIDER_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_DATA_PROVIDER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_DATA_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 14 matching lines...) Expand all Loading... |
25 // library XML file it will read it in, parse the data, and provide convenient | 25 // library XML file it will read it in, parse the data, and provide convenient |
26 // methods to access it. When the file changes, it will update the data. | 26 // methods to access it. When the file changes, it will update the data. |
27 // It is not thread safe, but can be run on any thread with IO access. | 27 // It is not thread safe, but can be run on any thread with IO access. |
28 class IPhotoDataProvider : public iapps::IAppsDataProvider { | 28 class IPhotoDataProvider : public iapps::IAppsDataProvider { |
29 public: | 29 public: |
30 explicit IPhotoDataProvider(const base::FilePath& library_path); | 30 explicit IPhotoDataProvider(const base::FilePath& library_path); |
31 virtual ~IPhotoDataProvider(); | 31 virtual ~IPhotoDataProvider(); |
32 | 32 |
33 // Parse the library xml file. | 33 // Parse the library xml file. |
34 virtual void DoParseLibrary(const base::FilePath& library_path, | 34 virtual void DoParseLibrary(const base::FilePath& library_path, |
35 const ReadyCallback& ready_callback) OVERRIDE; | 35 const ReadyCallback& ready_callback) override; |
36 | 36 |
37 virtual std::vector<std::string> GetAlbumNames() const; | 37 virtual std::vector<std::string> GetAlbumNames() const; |
38 virtual std::map<std::string, base::FilePath> GetAlbumContents( | 38 virtual std::map<std::string, base::FilePath> GetAlbumContents( |
39 const std::string& album) const; | 39 const std::string& album) const; |
40 virtual base::FilePath GetPhotoLocationInAlbum( | 40 virtual base::FilePath GetPhotoLocationInAlbum( |
41 const std::string& album, | 41 const std::string& album, |
42 const std::string& filename) const; | 42 const std::string& filename) const; |
43 | 43 |
44 virtual bool HasOriginals(const std::string& album) const; | 44 virtual bool HasOriginals(const std::string& album) const; |
45 virtual std::map<std::string, base::FilePath> GetOriginals( | 45 virtual std::map<std::string, base::FilePath> GetOriginals( |
(...skipping 22 matching lines...) Expand all Loading... |
68 scoped_refptr<iapps::SafeIAppsLibraryParser> xml_parser_; | 68 scoped_refptr<iapps::SafeIAppsLibraryParser> xml_parser_; |
69 | 69 |
70 base::WeakPtrFactory<IPhotoDataProvider> weak_factory_; | 70 base::WeakPtrFactory<IPhotoDataProvider> weak_factory_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(IPhotoDataProvider); | 72 DISALLOW_COPY_AND_ASSIGN(IPhotoDataProvider); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace iphoto | 75 } // namespace iphoto |
76 | 76 |
77 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_DATA_PROVIDER_H_ | 77 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_DATA_PROVIDER_H_ |
OLD | NEW |