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 <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // extension unpacker to determine which assets should be transcoded safely | 124 // extension unpacker to determine which assets should be transcoded safely |
125 // within the utility sandbox. | 125 // within the utility sandbox. |
126 // | 126 // |
127 // The default implementation returns the images used as icons for the | 127 // The default implementation returns the images used as icons for the |
128 // extension itself, so implementors of ExtensionsClient overriding this may | 128 // extension itself, so implementors of ExtensionsClient overriding this may |
129 // want to call the base class version and then add additional paths to that | 129 // want to call the base class version and then add additional paths to that |
130 // result. | 130 // result. |
131 virtual std::set<base::FilePath> GetBrowserImagePaths( | 131 virtual std::set<base::FilePath> GetBrowserImagePaths( |
132 const Extension* extension); | 132 const Extension* extension); |
133 | 133 |
| 134 // Returns whether or not extension APIs are allowed in extension service |
| 135 // workers. |
| 136 // This is currently disallowed as the code to support this is work in |
| 137 // progress. |
| 138 // Can be overridden in tests. |
| 139 virtual bool ExtensionAPIEnabledInExtensionServiceWorkers() const; |
| 140 |
134 // Return the extensions client. | 141 // Return the extensions client. |
135 static ExtensionsClient* Get(); | 142 static ExtensionsClient* Get(); |
136 | 143 |
137 // Initialize the extensions system with this extensions client. | 144 // Initialize the extensions system with this extensions client. |
138 static void Set(ExtensionsClient* client); | 145 static void Set(ExtensionsClient* client); |
139 }; | 146 }; |
140 | 147 |
141 } // namespace extensions | 148 } // namespace extensions |
142 | 149 |
143 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ | 150 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ |
OLD | NEW |