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 CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ |
6 #define CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ | 6 #define CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 virtual void FilterHostPermissions( | 31 virtual void FilterHostPermissions( |
32 const URLPatternSet& hosts, | 32 const URLPatternSet& hosts, |
33 URLPatternSet* new_hosts, | 33 URLPatternSet* new_hosts, |
34 std::set<PermissionMessage>* messages) const OVERRIDE; | 34 std::set<PermissionMessage>* messages) const OVERRIDE; |
35 virtual void SetScriptingWhitelist(const ScriptingWhitelist& whitelist) | 35 virtual void SetScriptingWhitelist(const ScriptingWhitelist& whitelist) |
36 OVERRIDE; | 36 OVERRIDE; |
37 virtual const ScriptingWhitelist& GetScriptingWhitelist() const OVERRIDE; | 37 virtual const ScriptingWhitelist& GetScriptingWhitelist() const OVERRIDE; |
38 virtual URLPatternSet GetPermittedChromeSchemeHosts( | 38 virtual URLPatternSet GetPermittedChromeSchemeHosts( |
39 const Extension* extension, | 39 const Extension* extension, |
40 const APIPermissionSet& api_permissions) const OVERRIDE; | 40 const APIPermissionSet& api_permissions) const OVERRIDE; |
41 | 41 virtual bool IsScriptableURL(const GURL& url, std::string* error) const |
| 42 OVERRIDE; |
42 // Get the LazyInstance for ChromeExtensionsClient. | 43 // Get the LazyInstance for ChromeExtensionsClient. |
43 static ChromeExtensionsClient* GetInstance(); | 44 static ChromeExtensionsClient* GetInstance(); |
44 | 45 |
45 private: | 46 private: |
46 const ChromeAPIPermissions chrome_api_permissions_; | 47 const ChromeAPIPermissions chrome_api_permissions_; |
47 const ChromePermissionMessageProvider permission_message_provider_; | 48 const ChromePermissionMessageProvider permission_message_provider_; |
48 | 49 |
49 // A whitelist of extensions that can script anywhere. Do not add to this | 50 // A whitelist of extensions that can script anywhere. Do not add to this |
50 // list (except in tests) without consulting the Extensions team first. | 51 // list (except in tests) without consulting the Extensions team first. |
51 // Note: Component extensions have this right implicitly and do not need to be | 52 // Note: Component extensions have this right implicitly and do not need to be |
52 // added to this list. | 53 // added to this list. |
53 ScriptingWhitelist scripting_whitelist_; | 54 ScriptingWhitelist scripting_whitelist_; |
54 | 55 |
55 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; | 56 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; |
56 | 57 |
57 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); | 58 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); |
58 }; | 59 }; |
59 | 60 |
60 } // namespace extensions | 61 } // namespace extensions |
61 | 62 |
62 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ | 63 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ |
OLD | NEW |