| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 bool IsAPISchemaGenerated(const std::string& name) const override; | 45 bool IsAPISchemaGenerated(const std::string& name) const override; |
| 46 base::StringPiece GetAPISchema(const std::string& name) const override; | 46 base::StringPiece GetAPISchema(const std::string& name) const override; |
| 47 void RegisterAPISchemaResources(ExtensionAPI* api) const override; | 47 void RegisterAPISchemaResources(ExtensionAPI* api) const override; |
| 48 bool ShouldSuppressFatalErrors() const override; | 48 bool ShouldSuppressFatalErrors() const override; |
| 49 void RecordDidSuppressFatalError() override; | 49 void RecordDidSuppressFatalError() override; |
| 50 std::string GetWebstoreBaseURL() const override; | 50 std::string GetWebstoreBaseURL() const override; |
| 51 std::string GetWebstoreUpdateURL() const override; | 51 std::string GetWebstoreUpdateURL() const override; |
| 52 bool IsBlacklistUpdateURL(const GURL& url) const override; | 52 bool IsBlacklistUpdateURL(const GURL& url) const override; |
| 53 std::set<base::FilePath> GetBrowserImagePaths( | 53 std::set<base::FilePath> GetBrowserImagePaths( |
| 54 const Extension* extension) override; | 54 const Extension* extension) override; |
| 55 bool ExtensionAPIEnabledInExtensionServiceWorkers() const override; |
| 55 | 56 |
| 56 // Get the LazyInstance for ChromeExtensionsClient. | 57 // Get the LazyInstance for ChromeExtensionsClient. |
| 57 static ChromeExtensionsClient* GetInstance(); | 58 static ChromeExtensionsClient* GetInstance(); |
| 58 | 59 |
| 59 private: | 60 private: |
| 60 const ChromeAPIPermissions chrome_api_permissions_; | 61 const ChromeAPIPermissions chrome_api_permissions_; |
| 61 const ExtensionsAPIPermissions extensions_api_permissions_; | 62 const ExtensionsAPIPermissions extensions_api_permissions_; |
| 62 const ChromePermissionMessageProvider permission_message_provider_; | 63 const ChromePermissionMessageProvider permission_message_provider_; |
| 63 | 64 |
| 64 // A whitelist of extensions that can script anywhere. Do not add to this | 65 // A whitelist of extensions that can script anywhere. Do not add to this |
| 65 // list (except in tests) without consulting the Extensions team first. | 66 // list (except in tests) without consulting the Extensions team first. |
| 66 // Note: Component extensions have this right implicitly and do not need to be | 67 // Note: Component extensions have this right implicitly and do not need to be |
| 67 // added to this list. | 68 // added to this list. |
| 68 ScriptingWhitelist scripting_whitelist_; | 69 ScriptingWhitelist scripting_whitelist_; |
| 69 | 70 |
| 70 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; | 71 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>; |
| 71 | 72 |
| 72 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); | 73 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace extensions | 76 } // namespace extensions |
| 76 | 77 |
| 77 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ | 78 #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSIONS_CLIENT_H_ |
| OLD | NEW |