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 EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ |
6 #define EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ | 6 #define EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 27 matching lines...) Expand all Loading... | |
38 // Initializes global state. Not done in the constructor because unit tests | 38 // Initializes global state. Not done in the constructor because unit tests |
39 // can create additional ExtensionsClients because the utility thread runs | 39 // can create additional ExtensionsClients because the utility thread runs |
40 // in-process. | 40 // in-process. |
41 virtual void Initialize() = 0; | 41 virtual void Initialize() = 0; |
42 | 42 |
43 // Returns the global PermissionMessageProvider to use to provide permission | 43 // Returns the global PermissionMessageProvider to use to provide permission |
44 // warning strings. | 44 // warning strings. |
45 virtual const PermissionMessageProvider& GetPermissionMessageProvider() | 45 virtual const PermissionMessageProvider& GetPermissionMessageProvider() |
46 const = 0; | 46 const = 0; |
47 | 47 |
48 // Returns the application name. | |
James Cook
2014/08/25 20:58:12
I would provide examples, 'for example, "Chrome" o
Xi Han
2014/08/26 18:21:40
Done.
| |
49 virtual const std::string GetProductName() = 0; | |
50 | |
48 // Create a FeatureProvider for a specific feature type, e.g. "permission". | 51 // Create a FeatureProvider for a specific feature type, e.g. "permission". |
49 virtual scoped_ptr<FeatureProvider> CreateFeatureProvider( | 52 virtual scoped_ptr<FeatureProvider> CreateFeatureProvider( |
50 const std::string& name) const = 0; | 53 const std::string& name) const = 0; |
51 | 54 |
52 // Create a JSONFeatureProviderSource for a specific feature type, | 55 // Create a JSONFeatureProviderSource for a specific feature type, |
53 // e.g. "permission". Currently, all features are loaded from | 56 // e.g. "permission". Currently, all features are loaded from |
54 // JSONFeatureProviderSources. | 57 // JSONFeatureProviderSources. |
55 // This is used primarily in CreateFeatureProvider, above. | 58 // This is used primarily in CreateFeatureProvider, above. |
56 virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource( | 59 virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource( |
57 const std::string& name) const = 0; | 60 const std::string& name) const = 0; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 // Return the extensions client. | 100 // Return the extensions client. |
98 static ExtensionsClient* Get(); | 101 static ExtensionsClient* Get(); |
99 | 102 |
100 // Initialize the extensions system with this extensions client. | 103 // Initialize the extensions system with this extensions client. |
101 static void Set(ExtensionsClient* client); | 104 static void Set(ExtensionsClient* client); |
102 }; | 105 }; |
103 | 106 |
104 } // namespace extensions | 107 } // namespace extensions |
105 | 108 |
106 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ | 109 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ |
OLD | NEW |