| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MOJO_SERVICES_CATALOG_STORE_H_ | 5 #ifndef MOJO_SERVICES_CATALOG_STORE_H_ |
| 6 #define MOJO_SERVICES_CATALOG_STORE_H_ | 6 #define MOJO_SERVICES_CATALOG_STORE_H_ |
| 7 | 7 |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 | 9 |
| 10 namespace catalog { | 10 namespace catalog { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Value is a dictionary. | 25 // Value is a dictionary. |
| 26 static const char kCapabilitiesKey[]; | 26 static const char kCapabilitiesKey[]; |
| 27 // Value is a dictionary. | 27 // Value is a dictionary. |
| 28 static const char kCapabilities_ProvidedKey[]; | 28 static const char kCapabilities_ProvidedKey[]; |
| 29 // Value is a dictionary. | 29 // Value is a dictionary. |
| 30 static const char kCapabilities_RequiredKey[]; | 30 static const char kCapabilities_RequiredKey[]; |
| 31 // Value is a list. | 31 // Value is a list. |
| 32 static const char kCapabilities_ClassesKey[]; | 32 static const char kCapabilities_ClassesKey[]; |
| 33 // Value is a list. | 33 // Value is a list. |
| 34 static const char kCapabilities_InterfacesKey[]; | 34 static const char kCapabilities_InterfacesKey[]; |
| 35 // Value is a list. |
| 36 static const char kApplicationsKey[]; |
| 35 | 37 |
| 36 virtual ~Store() {} | 38 virtual ~Store() {} |
| 37 | 39 |
| 38 // Called during initialization to construct the Catalog's catalog. | 40 // Called during initialization to construct the Catalog's catalog. |
| 39 // Returns a serialized list of the apps. Each entry in the returned list | 41 // Returns a serialized list of the apps. Each entry in the returned list |
| 40 // corresponds to an app (as a dictionary). Each dictionary has a name, | 42 // corresponds to an app (as a dictionary). Each dictionary has a name, |
| 41 // display name and capabilities. The return value is owned by the caller. | 43 // display name and capabilities. The return value is owned by the caller. |
| 42 virtual const base::ListValue* GetStore() = 0; | 44 virtual const base::ListValue* GetStore() = 0; |
| 43 | 45 |
| 44 // Write the catalog to the store. Called when the Catalog learns of a newly | 46 // Write the catalog to the store. Called when the Catalog learns of a newly |
| 45 // encountered application. | 47 // encountered application. |
| 46 virtual void UpdateStore(scoped_ptr<base::ListValue> store) = 0; | 48 virtual void UpdateStore(scoped_ptr<base::ListValue> store) = 0; |
| 47 }; | 49 }; |
| 48 | 50 |
| 49 } // namespace catalog | 51 } // namespace catalog |
| 50 | 52 |
| 51 #endif // MOJO_SERVICES_CATALOG_STORE_H_ | 53 #endif // MOJO_SERVICES_CATALOG_STORE_H_ |
| OLD | NEW |