| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/shell/common/shell_extensions_client.h" | 5 #include "extensions/shell/common/shell_extensions_client.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "extensions/common/api/generated_schemas.h" | 10 #include "extensions/common/api/generated_schemas.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 base::StringPiece ShellExtensionsClient::GetAPISchema( | 165 base::StringPiece ShellExtensionsClient::GetAPISchema( |
| 166 const std::string& name) const { | 166 const std::string& name) const { |
| 167 // Schema for app_shell-only APIs. | 167 // Schema for app_shell-only APIs. |
| 168 if (shell::api::ShellGeneratedSchemas::IsGenerated(name)) | 168 if (shell::api::ShellGeneratedSchemas::IsGenerated(name)) |
| 169 return shell::api::ShellGeneratedSchemas::Get(name); | 169 return shell::api::ShellGeneratedSchemas::Get(name); |
| 170 | 170 |
| 171 // Core extensions APIs. | 171 // Core extensions APIs. |
| 172 return api::GeneratedSchemas::Get(name); | 172 return api::GeneratedSchemas::Get(name); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void ShellExtensionsClient::RegisterAPISchemaResources( | |
| 176 ExtensionAPI* api) const { | |
| 177 } | |
| 178 | |
| 179 bool ShellExtensionsClient::ShouldSuppressFatalErrors() const { | 175 bool ShellExtensionsClient::ShouldSuppressFatalErrors() const { |
| 180 return true; | 176 return true; |
| 181 } | 177 } |
| 182 | 178 |
| 183 void ShellExtensionsClient::RecordDidSuppressFatalError() { | 179 void ShellExtensionsClient::RecordDidSuppressFatalError() { |
| 184 } | 180 } |
| 185 | 181 |
| 186 std::string ShellExtensionsClient::GetWebstoreBaseURL() const { | 182 std::string ShellExtensionsClient::GetWebstoreBaseURL() const { |
| 187 return extension_urls::kChromeWebstoreBaseURL; | 183 return extension_urls::kChromeWebstoreBaseURL; |
| 188 } | 184 } |
| 189 | 185 |
| 190 std::string ShellExtensionsClient::GetWebstoreUpdateURL() const { | 186 std::string ShellExtensionsClient::GetWebstoreUpdateURL() const { |
| 191 return extension_urls::kChromeWebstoreUpdateURL; | 187 return extension_urls::kChromeWebstoreUpdateURL; |
| 192 } | 188 } |
| 193 | 189 |
| 194 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { | 190 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { |
| 195 // TODO(rockot): Maybe we want to do something else here. For now we accept | 191 // TODO(rockot): Maybe we want to do something else here. For now we accept |
| 196 // any URL as a blacklist URL because we don't really care. | 192 // any URL as a blacklist URL because we don't really care. |
| 197 return true; | 193 return true; |
| 198 } | 194 } |
| 199 | 195 |
| 200 } // namespace extensions | 196 } // namespace extensions |
| OLD | NEW |