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