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 30 matching lines...) Expand all Loading... |
41 virtual URLPatternSet GetPermittedChromeSchemeHosts( | 41 virtual URLPatternSet GetPermittedChromeSchemeHosts( |
42 const Extension* extension, | 42 const Extension* extension, |
43 const APIPermissionSet& api_permissions) const OVERRIDE; | 43 const APIPermissionSet& api_permissions) const OVERRIDE; |
44 virtual bool IsScriptableURL(const GURL& url, std::string* error) const | 44 virtual bool IsScriptableURL(const GURL& url, std::string* error) const |
45 OVERRIDE; | 45 OVERRIDE; |
46 virtual bool IsAPISchemaGenerated(const std::string& name) const OVERRIDE; | 46 virtual bool IsAPISchemaGenerated(const std::string& name) const OVERRIDE; |
47 virtual base::StringPiece GetAPISchema(const std::string& name) const | 47 virtual base::StringPiece GetAPISchema(const std::string& name) const |
48 OVERRIDE; | 48 OVERRIDE; |
49 virtual void RegisterAPISchemaResources(ExtensionAPI* api) const OVERRIDE; | 49 virtual void RegisterAPISchemaResources(ExtensionAPI* api) const OVERRIDE; |
50 virtual bool ShouldSuppressFatalErrors() const OVERRIDE; | 50 virtual bool ShouldSuppressFatalErrors() const OVERRIDE; |
| 51 virtual std::string GetWebstoreBaseURL() const OVERRIDE; |
| 52 virtual std::string GetWebstoreUpdateURL() const OVERRIDE; |
| 53 virtual bool IsBlacklistUpdateURL(const GURL& url) const OVERRIDE; |
51 | 54 |
52 // Get the LazyInstance for ChromeExtensionsClient. | 55 // Get the LazyInstance for ChromeExtensionsClient. |
53 static ChromeExtensionsClient* GetInstance(); | 56 static ChromeExtensionsClient* GetInstance(); |
54 | 57 |
55 private: | 58 private: |
56 const ChromeAPIPermissions chrome_api_permissions_; | 59 const ChromeAPIPermissions chrome_api_permissions_; |
57 const ExtensionsAPIPermissions extensions_api_permissions_; | 60 const ExtensionsAPIPermissions extensions_api_permissions_; |
58 const ChromePermissionMessageProvider permission_message_provider_; | 61 const ChromePermissionMessageProvider permission_message_provider_; |
59 | 62 |
60 // A whitelist of extensions that can script anywhere. Do not add to this | 63 // A whitelist of extensions that can script anywhere. Do not add to this |
61 // list (except in tests) without consulting the Extensions team first. | 64 // list (except in tests) without consulting the Extensions team first. |
62 // Note: Component extensions have this right implicitly and do not need to be | 65 // Note: Component extensions have this right implicitly and do not need to be |
63 // added to this list. | 66 // added to this list. |
64 ScriptingWhitelist scripting_whitelist_; | 67 ScriptingWhitelist scripting_whitelist_; |
65 | 68 |
66 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; | 69 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; |
67 | 70 |
68 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); | 71 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); |
69 }; | 72 }; |
70 | 73 |
71 } // namespace extensions | 74 } // namespace extensions |
72 | 75 |
73 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ | 76 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ |
OLD | NEW |