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 #include "apps/shell/common/shell_extensions_client.h" | 5 #include "apps/shell/common/shell_extensions_client.h" |
6 | 6 |
| 7 #include "apps/common/api/generated_schemas.h" |
7 #include "base/logging.h" | 8 #include "base/logging.h" |
8 #include "chrome/common/extensions/api/generated_schemas.h" | 9 #include "chrome/common/extensions/api/generated_schemas.h" |
9 #include "chrome/common/extensions/features/base_feature_provider.h" | 10 #include "chrome/common/extensions/features/base_feature_provider.h" |
10 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" | 11 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" |
11 #include "extensions/common/api/generated_schemas.h" | 12 #include "extensions/common/api/generated_schemas.h" |
12 #include "extensions/common/api/sockets/sockets_manifest_handler.h" | 13 #include "extensions/common/api/sockets/sockets_manifest_handler.h" |
13 #include "extensions/common/common_manifest_handlers.h" | 14 #include "extensions/common/common_manifest_handlers.h" |
14 #include "extensions/common/manifest_handler.h" | 15 #include "extensions/common/manifest_handler.h" |
15 #include "extensions/common/permissions/permission_message_provider.h" | 16 #include "extensions/common/permissions/permission_message_provider.h" |
16 #include "extensions/common/permissions/permissions_provider.h" | 17 #include "extensions/common/permissions/permissions_provider.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 std::string* error) const { | 149 std::string* error) const { |
149 NOTIMPLEMENTED(); | 150 NOTIMPLEMENTED(); |
150 return true; | 151 return true; |
151 } | 152 } |
152 | 153 |
153 bool ShellExtensionsClient::IsAPISchemaGenerated( | 154 bool ShellExtensionsClient::IsAPISchemaGenerated( |
154 const std::string& name) const { | 155 const std::string& name) const { |
155 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs | 156 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs |
156 // moved out. See http://crbug.com/349042. | 157 // moved out. See http://crbug.com/349042. |
157 return extensions::api::GeneratedSchemas::IsGenerated(name) || | 158 return extensions::api::GeneratedSchemas::IsGenerated(name) || |
158 extensions::core_api::GeneratedSchemas::IsGenerated(name); | 159 extensions::core_api::GeneratedSchemas::IsGenerated(name) || |
| 160 apps::api::GeneratedSchemas::IsGenerated(name); |
159 } | 161 } |
160 | 162 |
161 base::StringPiece ShellExtensionsClient::GetAPISchema( | 163 base::StringPiece ShellExtensionsClient::GetAPISchema( |
162 const std::string& name) const { | 164 const std::string& name) const { |
163 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs | 165 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs |
164 // moved out. See http://crbug.com/349042. | 166 // moved out. See http://crbug.com/349042. |
165 if (extensions::api::GeneratedSchemas::IsGenerated(name)) | 167 if (extensions::api::GeneratedSchemas::IsGenerated(name)) |
166 return extensions::api::GeneratedSchemas::Get(name); | 168 return extensions::api::GeneratedSchemas::Get(name); |
167 return extensions::core_api::GeneratedSchemas::Get(name); | 169 |
| 170 if (extensions::core_api::GeneratedSchemas::IsGenerated(name)) |
| 171 return extensions::core_api::GeneratedSchemas::Get(name); |
| 172 |
| 173 return apps::api::GeneratedSchemas::Get(name); |
168 } | 174 } |
169 | 175 |
170 } // namespace apps | 176 } // namespace apps |
OLD | NEW |