| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // Returns false if content scripts are forbidden from running on |url|. | 87 // Returns false if content scripts are forbidden from running on |url|. |
| 88 virtual bool IsScriptableURL(const GURL& url, std::string* error) const = 0; | 88 virtual bool IsScriptableURL(const GURL& url, std::string* error) const = 0; |
| 89 | 89 |
| 90 // Returns true iff a schema named |name| is generated. | 90 // Returns true iff a schema named |name| is generated. |
| 91 virtual bool IsAPISchemaGenerated(const std::string& name) const = 0; | 91 virtual bool IsAPISchemaGenerated(const std::string& name) const = 0; |
| 92 | 92 |
| 93 // Gets the generated API schema named |name|. | 93 // Gets the generated API schema named |name|. |
| 94 virtual base::StringPiece GetAPISchema(const std::string& name) const = 0; | 94 virtual base::StringPiece GetAPISchema(const std::string& name) const = 0; |
| 95 | 95 |
| 96 // Register non-generated API schema resources with the global ExtensionAPI. | |
| 97 // Called when the ExtensionAPI is lazily initialized. | |
| 98 virtual void RegisterAPISchemaResources(ExtensionAPI* api) const = 0; | |
| 99 | |
| 100 // Determines if certain fatal extensions errors should be surpressed | 96 // Determines if certain fatal extensions errors should be surpressed |
| 101 // (i.e., only logged) or allowed (i.e., logged before crashing). | 97 // (i.e., only logged) or allowed (i.e., logged before crashing). |
| 102 virtual bool ShouldSuppressFatalErrors() const = 0; | 98 virtual bool ShouldSuppressFatalErrors() const = 0; |
| 103 | 99 |
| 104 // Records that a fatal error was caught and suppressed. It is expected that | 100 // Records that a fatal error was caught and suppressed. It is expected that |
| 105 // embedders will only do so if ShouldSuppressFatalErrors at some point | 101 // embedders will only do so if ShouldSuppressFatalErrors at some point |
| 106 // returned true. | 102 // returned true. |
| 107 virtual void RecordDidSuppressFatalError() = 0; | 103 virtual void RecordDidSuppressFatalError() = 0; |
| 108 | 104 |
| 109 // Returns the base webstore URL prefix. | 105 // Returns the base webstore URL prefix. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 139 // Return the extensions client. | 135 // Return the extensions client. |
| 140 static ExtensionsClient* Get(); | 136 static ExtensionsClient* Get(); |
| 141 | 137 |
| 142 // Initialize the extensions system with this extensions client. | 138 // Initialize the extensions system with this extensions client. |
| 143 static void Set(ExtensionsClient* client); | 139 static void Set(ExtensionsClient* client); |
| 144 }; | 140 }; |
| 145 | 141 |
| 146 } // namespace extensions | 142 } // namespace extensions |
| 147 | 143 |
| 148 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ | 144 #endif // EXTENSIONS_COMMON_EXTENSIONS_CLIENT_H_ |
| OLD | NEW |