| 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> |
| 11 | 11 |
| 12 #include "base/strings/string_piece.h" |
| 13 |
| 12 class GURL; | 14 class GURL; |
| 13 | 15 |
| 14 namespace extensions { | 16 namespace extensions { |
| 15 | 17 |
| 16 class APIPermissionSet; | 18 class APIPermissionSet; |
| 17 class Extension; | 19 class Extension; |
| 18 class FeatureProvider; | 20 class FeatureProvider; |
| 19 class ManifestPermissionSet; | 21 class ManifestPermissionSet; |
| 20 class PermissionMessage; | 22 class PermissionMessage; |
| 21 class PermissionMessageProvider; | 23 class PermissionMessageProvider; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual const ScriptingWhitelist& GetScriptingWhitelist() const = 0; | 66 virtual const ScriptingWhitelist& GetScriptingWhitelist() const = 0; |
| 65 | 67 |
| 66 // Get the set of chrome:// hosts that |extension| can run content scripts on. | 68 // Get the set of chrome:// hosts that |extension| can run content scripts on. |
| 67 virtual URLPatternSet GetPermittedChromeSchemeHosts( | 69 virtual URLPatternSet GetPermittedChromeSchemeHosts( |
| 68 const Extension* extension, | 70 const Extension* extension, |
| 69 const APIPermissionSet& api_permissions) const = 0; | 71 const APIPermissionSet& api_permissions) const = 0; |
| 70 | 72 |
| 71 // Returns false if content scripts are forbidden from running on |url|. | 73 // Returns false if content scripts are forbidden from running on |url|. |
| 72 virtual bool IsScriptableURL(const GURL& url, std::string* error) const = 0; | 74 virtual bool IsScriptableURL(const GURL& url, std::string* error) const = 0; |
| 73 | 75 |
| 76 // Returns true iff a schema named |name| is generated. |
| 77 virtual bool IsAPISchemaGenerated(const std::string& name) const = 0; |
| 78 |
| 79 // Gets the API schema named |name|. |
| 80 virtual base::StringPiece GetAPISchema(const std::string& name) const = 0; |
| 81 |
| 74 // Return the extensions client. | 82 // Return the extensions client. |
| 75 static ExtensionsClient* Get(); | 83 static ExtensionsClient* Get(); |
| 76 | 84 |
| 77 // Initialize the extensions system with this extensions client. | 85 // Initialize the extensions system with this extensions client. |
| 78 static void Set(ExtensionsClient* client); | 86 static void Set(ExtensionsClient* client); |
| 79 }; | 87 }; |
| 80 | 88 |
| 81 } // namespace extensions | 89 } // namespace extensions |
| 82 | 90 |
| 83 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ | 91 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ |
| OLD | NEW |