| 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" |
| 11 #include "extensions/common/common_manifest_handlers.h" | 11 #include "extensions/common/common_manifest_handlers.h" |
| 12 #include "extensions/common/extension_urls.h" | 12 #include "extensions/common/extension_urls.h" |
| 13 #include "extensions/common/extensions_aliases.h" |
| 13 #include "extensions/common/features/api_feature.h" | 14 #include "extensions/common/features/api_feature.h" |
| 14 #include "extensions/common/features/behavior_feature.h" | 15 #include "extensions/common/features/behavior_feature.h" |
| 15 #include "extensions/common/features/json_feature_provider_source.h" | 16 #include "extensions/common/features/json_feature_provider_source.h" |
| 16 #include "extensions/common/features/manifest_feature.h" | 17 #include "extensions/common/features/manifest_feature.h" |
| 17 #include "extensions/common/features/permission_feature.h" | 18 #include "extensions/common/features/permission_feature.h" |
| 18 #include "extensions/common/features/simple_feature.h" | 19 #include "extensions/common/features/simple_feature.h" |
| 19 #include "extensions/common/manifest_handler.h" | 20 #include "extensions/common/manifest_handler.h" |
| 20 #include "extensions/common/permissions/permission_message_provider.h" | 21 #include "extensions/common/permissions/permission_message_provider.h" |
| 21 #include "extensions/common/permissions/permissions_info.h" | 22 #include "extensions/common/permissions/permissions_info.h" |
| 22 #include "extensions/common/permissions/permissions_provider.h" | 23 #include "extensions/common/permissions/permissions_provider.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 80 } |
| 80 | 81 |
| 81 ShellExtensionsClient::~ShellExtensionsClient() { | 82 ShellExtensionsClient::~ShellExtensionsClient() { |
| 82 } | 83 } |
| 83 | 84 |
| 84 void ShellExtensionsClient::Initialize() { | 85 void ShellExtensionsClient::Initialize() { |
| 85 RegisterCommonManifestHandlers(); | 86 RegisterCommonManifestHandlers(); |
| 86 ManifestHandler::FinalizeRegistration(); | 87 ManifestHandler::FinalizeRegistration(); |
| 87 // TODO(jamescook): Do we need to whitelist any extensions? | 88 // TODO(jamescook): Do we need to whitelist any extensions? |
| 88 | 89 |
| 89 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_); | 90 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_, |
| 91 GetExtensionsPermissionAliases()); |
| 90 } | 92 } |
| 91 | 93 |
| 92 const PermissionMessageProvider& | 94 const PermissionMessageProvider& |
| 93 ShellExtensionsClient::GetPermissionMessageProvider() const { | 95 ShellExtensionsClient::GetPermissionMessageProvider() const { |
| 94 NOTIMPLEMENTED(); | 96 NOTIMPLEMENTED(); |
| 95 return g_permission_message_provider.Get(); | 97 return g_permission_message_provider.Get(); |
| 96 } | 98 } |
| 97 | 99 |
| 98 const std::string ShellExtensionsClient::GetProductName() { | 100 const std::string ShellExtensionsClient::GetProductName() { |
| 99 return "app_shell"; | 101 return "app_shell"; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 return extension_urls::kChromeWebstoreUpdateURL; | 189 return extension_urls::kChromeWebstoreUpdateURL; |
| 188 } | 190 } |
| 189 | 191 |
| 190 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { | 192 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { |
| 191 // TODO(rockot): Maybe we want to do something else here. For now we accept | 193 // TODO(rockot): Maybe we want to do something else here. For now we accept |
| 192 // any URL as a blacklist URL because we don't really care. | 194 // any URL as a blacklist URL because we don't really care. |
| 193 return true; | 195 return true; |
| 194 } | 196 } |
| 195 | 197 |
| 196 } // namespace extensions | 198 } // namespace extensions |
| OLD | NEW |