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 class GURL; | |
13 | |
12 namespace extensions { | 14 namespace extensions { |
13 | 15 |
14 class APIPermissionSet; | 16 class APIPermissionSet; |
15 class Extension; | 17 class Extension; |
16 class FeatureProvider; | 18 class FeatureProvider; |
17 class PermissionMessage; | 19 class PermissionMessage; |
18 class PermissionMessageProvider; | 20 class PermissionMessageProvider; |
19 class PermissionsProvider; | 21 class PermissionsProvider; |
20 class URLPatternSet; | 22 class URLPatternSet; |
21 | 23 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 | 58 |
57 // Return the whitelist of extensions that can run content scripts on | 59 // Return the whitelist of extensions that can run content scripts on |
58 // any origin. | 60 // any origin. |
59 virtual const ScriptingWhitelist& GetScriptingWhitelist() const = 0; | 61 virtual const ScriptingWhitelist& GetScriptingWhitelist() const = 0; |
60 | 62 |
61 // Get the set of chrome:// hosts that |extension| can run content scripts on. | 63 // Get the set of chrome:// hosts that |extension| can run content scripts on. |
62 virtual URLPatternSet GetPermittedChromeSchemeHosts( | 64 virtual URLPatternSet GetPermittedChromeSchemeHosts( |
63 const Extension* extension, | 65 const Extension* extension, |
64 const APIPermissionSet& api_permissions) const = 0; | 66 const APIPermissionSet& api_permissions) const = 0; |
65 | 67 |
68 // Returns false if contents scripts are forbidden from running on |url|. | |
Daniel Erat
2013/11/11 23:39:27
nit: s/contents/content/ (unless i'm mistaken abou
Yoyo Zhou
2013/11/11 23:56:53
Oops.
| |
69 virtual bool IsScriptableURL(const GURL& url, std::string* error) const = 0; | |
70 | |
66 // Return the extensions client. | 71 // Return the extensions client. |
67 static ExtensionsClient* Get(); | 72 static ExtensionsClient* Get(); |
68 | 73 |
69 // Initialize the extensions system with this extensions client. | 74 // Initialize the extensions system with this extensions client. |
70 static void Set(ExtensionsClient* client); | 75 static void Set(ExtensionsClient* client); |
71 }; | 76 }; |
72 | 77 |
73 } // namespace extensions | 78 } // namespace extensions |
74 | 79 |
75 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ | 80 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ |
OLD | NEW |