Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: extensions/common/extensions_client.h

Issue 2165023003: [Extensions] Use compiled feature files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/BUILD.gn ('k') | extensions/common/features/simple_feature.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual const PermissionMessageProvider& GetPermissionMessageProvider() 50 virtual const PermissionMessageProvider& GetPermissionMessageProvider()
51 const = 0; 51 const = 0;
52 52
53 // Returns the application name. For example, "Chromium" or "app_shell". 53 // Returns the application name. For example, "Chromium" or "app_shell".
54 virtual const std::string GetProductName() = 0; 54 virtual const std::string GetProductName() = 0;
55 55
56 // Create a FeatureProvider for a specific feature type, e.g. "permission". 56 // Create a FeatureProvider for a specific feature type, e.g. "permission".
57 virtual std::unique_ptr<FeatureProvider> CreateFeatureProvider( 57 virtual std::unique_ptr<FeatureProvider> CreateFeatureProvider(
58 const std::string& name) const = 0; 58 const std::string& name) const = 0;
59 59
60 // Create a JSONFeatureProviderSource for a specific feature type, 60 // Returns the dictionary of the API features json file.
61 // e.g. "permission". Currently, all features are loaded from 61 // TODO(devlin): We should find a way to remove this.
62 // JSONFeatureProviderSources. 62 virtual std::unique_ptr<JSONFeatureProviderSource> CreateAPIFeatureSource()
63 // This is used primarily in CreateFeatureProvider, above. 63 const = 0;
64 virtual std::unique_ptr<JSONFeatureProviderSource>
65 CreateFeatureProviderSource(const std::string& name) const = 0;
66 64
67 // Takes the list of all hosts and filters out those with special 65 // Takes the list of all hosts and filters out those with special
68 // permission strings. Adds the regular hosts to |new_hosts|, 66 // permission strings. Adds the regular hosts to |new_hosts|,
69 // and adds any additional permissions to |permissions|. 67 // and adds any additional permissions to |permissions|.
70 // TODO(sashab): Split this function in two: One to filter out ignored host 68 // TODO(sashab): Split this function in two: One to filter out ignored host
71 // permissions, and one to get permissions for the given hosts. 69 // permissions, and one to get permissions for the given hosts.
72 virtual void FilterHostPermissions(const URLPatternSet& hosts, 70 virtual void FilterHostPermissions(const URLPatternSet& hosts,
73 URLPatternSet* new_hosts, 71 URLPatternSet* new_hosts,
74 PermissionIDSet* permissions) const = 0; 72 PermissionIDSet* permissions) const = 0;
75 73
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Return the extensions client. 139 // Return the extensions client.
142 static ExtensionsClient* Get(); 140 static ExtensionsClient* Get();
143 141
144 // Initialize the extensions system with this extensions client. 142 // Initialize the extensions system with this extensions client.
145 static void Set(ExtensionsClient* client); 143 static void Set(ExtensionsClient* client);
146 }; 144 };
147 145
148 } // namespace extensions 146 } // namespace extensions
149 147
150 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ 148 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/BUILD.gn ('k') | extensions/common/features/simple_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698