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_CHROMEOS_DRIVE_DRIVE_WEBAPPS_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_WEBAPPS_REGISTRY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_WEBAPPS_REGISTRY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_WEBAPPS_REGISTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "chrome/browser/google_apis/gdata_wapi_parser.h" | 13 #include "chrome/browser/google_apis/gdata_wapi_parser.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 | 15 |
| 16 namespace base { |
16 class FilePath; | 17 class FilePath; |
| 18 } |
17 | 19 |
18 namespace google_apis { | 20 namespace google_apis { |
19 class AppList; | 21 class AppList; |
20 } | 22 } |
21 | 23 |
22 namespace drive { | 24 namespace drive { |
23 | 25 |
24 // Data structure that defines WebApp | 26 // Data structure that defines WebApp |
25 struct DriveWebAppInfo { | 27 struct DriveWebAppInfo { |
26 DriveWebAppInfo(const std::string& app_id, | 28 DriveWebAppInfo(const std::string& app_id, |
(...skipping 23 matching lines...) Expand all Loading... |
50 bool is_primary_selector; | 52 bool is_primary_selector; |
51 }; | 53 }; |
52 | 54 |
53 // Keeps the track of installed drive web application and provider in-memory. | 55 // Keeps the track of installed drive web application and provider in-memory. |
54 class DriveWebAppsRegistry { | 56 class DriveWebAppsRegistry { |
55 public: | 57 public: |
56 DriveWebAppsRegistry(); | 58 DriveWebAppsRegistry(); |
57 virtual ~DriveWebAppsRegistry(); | 59 virtual ~DriveWebAppsRegistry(); |
58 | 60 |
59 // DriveWebAppsRegistry overrides. | 61 // DriveWebAppsRegistry overrides. |
60 virtual void GetWebAppsForFile(const FilePath& file, | 62 virtual void GetWebAppsForFile(const base::FilePath& file, |
61 const std::string& mime_type, | 63 const std::string& mime_type, |
62 ScopedVector<DriveWebAppInfo>* apps); | 64 ScopedVector<DriveWebAppInfo>* apps); |
63 virtual std::set<std::string> GetExtensionsForWebStoreApp( | 65 virtual std::set<std::string> GetExtensionsForWebStoreApp( |
64 const std::string& web_store_id); | 66 const std::string& web_store_id); |
65 virtual void UpdateFromFeed( | 67 virtual void UpdateFromFeed( |
66 const google_apis::AccountMetadataFeed& metadata); | 68 const google_apis::AccountMetadataFeed& metadata); |
67 virtual void UpdateFromAppList(const google_apis::AppList& applist); | 69 virtual void UpdateFromAppList(const google_apis::AppList& applist); |
68 | 70 |
69 private: | 71 private: |
70 // Defines WebApp application details that are associated with a given | 72 // Defines WebApp application details that are associated with a given |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 131 |
130 // Map of MIME type to application info. | 132 // Map of MIME type to application info. |
131 WebAppFileSelectorMap webapp_mimetypes_map_; | 133 WebAppFileSelectorMap webapp_mimetypes_map_; |
132 | 134 |
133 DISALLOW_COPY_AND_ASSIGN(DriveWebAppsRegistry); | 135 DISALLOW_COPY_AND_ASSIGN(DriveWebAppsRegistry); |
134 }; | 136 }; |
135 | 137 |
136 } // namespace drive | 138 } // namespace drive |
137 | 139 |
138 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_WEBAPPS_REGISTRY_H_ | 140 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_WEBAPPS_REGISTRY_H_ |
OLD | NEW |