Commit e33aa242 authored by thestig's avatar thestig Committed by Commit bot

Cleanup: Remove remaining generated extensions APIs on Android. (try 2)

BUG=305852

Review URL: https://codereview.chromium.org/586623002

Cr-Commit-Position: refs/heads/master@{#296067}
parent 2f9bd09e
......@@ -55,7 +55,10 @@ static_library("apps") {
if (!enable_extensions) {
# When extensions are disabled, only the sizer file below is included.
deps -= [ "//chrome/browser/extensions" ]
deps -= [
"//chrome/browser/extensions",
"//chrome/common/extensions/api:api",
]
sources = []
}
......
......@@ -70,6 +70,7 @@
{
'dependencies!': [
'browser_extensions',
'common/extensions/api/api.gyp:chrome_api',
],
'sources/': [
['exclude', '.*'],
......
......@@ -150,8 +150,6 @@ static_library("browser") {
"//apps",
"//cc",
"//chrome/browser/devtools",
"//chrome/common/extensions/api",
"//chrome/common/extensions/api:api_registration",
"//chrome/installer/util",
"//components/autofill/content/browser",
"//components/dom_distiller/content",
......@@ -245,6 +243,8 @@ static_library("browser") {
deps += [
"//chrome/browser/extensions",
"//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
"//chrome/common/extensions/api",
"//chrome/common/extensions/api:api_registration",
]
forward_dependent_configs_from += [ "//chrome/browser/extensions" ]
sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
......
......@@ -32,11 +32,14 @@
#include "components/omnibox/autocomplete_result.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(ENABLE_EXTENSIONS)
#include "extensions/browser/notification_types.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/value_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
#endif
using base::ASCIIToUTF16;
......@@ -819,6 +822,7 @@ TEST_F(ShortcutsProviderTest, DeleteMatch) {
backend_->shortcuts_map().find(ASCIIToUTF16("delete")));
}
#if defined(ENABLE_EXTENSIONS)
TEST_F(ShortcutsProviderTest, Extension) {
// Try an input string that matches an extension URL.
base::string16 text(ASCIIToUTF16("echo"));
......@@ -847,3 +851,4 @@ TEST_F(ShortcutsProviderTest, Extension) {
// Now the URL should have disappeared.
RunTest(text, false, ExpectedURLs(), std::string(), base::string16());
}
#endif
......@@ -9,9 +9,12 @@
#include "components/policy/core/browser/configuration_policy_pref_store_test.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/schema.h"
#include "extensions/common/value_builder.h"
#include "policy/policy_constants.h"
#if defined(ENABLE_EXTENSIONS)
#include "extensions/common/value_builder.h"
#endif
namespace policy {
class ManagedBookmarksPolicyHandlerTest
......@@ -23,6 +26,7 @@ class ManagedBookmarksPolicyHandlerTest
}
};
#if defined(ENABLE_EXTENSIONS)
TEST_F(ManagedBookmarksPolicyHandlerTest, ApplyPolicySettings) {
EXPECT_FALSE(store_->GetValue(bookmarks::prefs::kManagedBookmarks, NULL));
......@@ -101,6 +105,7 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, ApplyPolicySettings) {
.Build());
EXPECT_TRUE(pref_value->Equals(expected.get()));
}
#endif // defined(ENABLE_EXTENSIONS)
TEST_F(ManagedBookmarksPolicyHandlerTest, WrongPolicyType) {
PolicyMap policy;
......@@ -121,6 +126,7 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, WrongPolicyType) {
EXPECT_FALSE(store_->GetValue(bookmarks::prefs::kManagedBookmarks, NULL));
}
#if defined(ENABLE_EXTENSIONS)
TEST_F(ManagedBookmarksPolicyHandlerTest, UnknownKeys) {
PolicyMap policy;
policy.Set(key::kManagedBookmarks,
......@@ -149,7 +155,9 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, UnknownKeys) {
.Build());
EXPECT_TRUE(pref_value->Equals(expected.get()));
}
#endif
#if defined(ENABLE_EXTENSIONS)
TEST_F(ManagedBookmarksPolicyHandlerTest, BadBookmark) {
PolicyMap policy;
policy.Set(key::kManagedBookmarks,
......@@ -189,5 +197,6 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, BadBookmark) {
.Build());
EXPECT_TRUE(pref_value->Equals(expected.get()));
}
#endif
} // namespace policy
......@@ -84,8 +84,6 @@ static_library("ui") {
"//chrome/browser/devtools",
"//chrome/browser/ui/views",
"//chrome/browser/ui/webui/omnibox:mojo_bindings",
"//chrome/common/extensions/api",
"//chrome/common/extensions/api:api_registration",
"//chrome/installer/util",
"//components/autofill/content/browser:risk_proto",
"//components/power",
......@@ -382,7 +380,11 @@ static_library("ui") {
}
}
if (enable_extensions) {
deps += [ "//chrome/browser/extensions" ]
deps += [
"//chrome/browser/extensions",
"//chrome/common/extensions/api",
"//chrome/common/extensions/api:api_registration",
]
sources += rebase_path(gypi_values.chrome_browser_ui_extensions_sources,
".", "//chrome")
}
......
......@@ -2881,8 +2881,6 @@
['OS != "ios"', {
'dependencies': [
'apps',
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
'common/extensions/api/api.gyp:chrome_api',
'debugger',
'installer_util',
'../third_party/re2/re2.gyp:re2',
......@@ -3008,6 +3006,8 @@
['enable_extensions==1', {
'dependencies': [
'browser_extensions',
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
'common/extensions/api/api.gyp:chrome_api',
'sync_file_system_drive_proto',
],
'sources': [ '<@(chrome_browser_extensions_sources)' ],
......
......@@ -2608,9 +2608,7 @@
'<(SHARED_INTERMEDIATE_DIR)/chrome/browser/ui/webui/omnibox/omnibox.mojom.cc',
],
'dependencies': [
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
'chrome_web_ui_mojo_bindings.gyp:web_ui_mojo_bindings',
'common/extensions/api/api.gyp:chrome_api',
'debugger',
'installer_util',
'../components/components.gyp:autofill_content_risk_proto',
......@@ -2960,6 +2958,8 @@
['enable_extensions==1', {
'dependencies': [
'browser_extensions',
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
'common/extensions/api/api.gyp:chrome_api',
],
'sources': [ '<@(chrome_browser_ui_extensions_sources)' ],
}],
......
......@@ -53,30 +53,14 @@
'common/custom_handlers/protocol_handler.cc',
'common/custom_handlers/protocol_handler.h',
'common/descriptors_android.h',
'common/extensions/api/extension_action/action_info.cc',
'common/extensions/api/extension_action/action_info.h',
'common/extensions/api/i18n/default_locale_handler.cc',
'common/extensions/api/i18n/default_locale_handler.h',
'common/extensions/api/identity/oauth2_manifest_handler.cc',
'common/extensions/api/identity/oauth2_manifest_handler.h',
'common/extensions/api/plugins/plugins_handler.cc',
'common/extensions/api/plugins/plugins_handler.h',
'common/extensions/api/storage/storage_schema_manifest_handler.cc',
'common/extensions/api/storage/storage_schema_manifest_handler.h',
'common/extensions/api/supervised_user_private/supervised_user_handler.cc',
'common/extensions/api/supervised_user_private/supervised_user_handler.h',
'common/extensions/chrome_extension_messages.h',
'common/extensions/chrome_extensions_client.cc',
'common/extensions/chrome_extensions_client.h',
'common/extensions/chrome_manifest_handlers.cc',
'common/extensions/chrome_manifest_handlers.h',
'common/extensions/chrome_utility_extensions_messages.h',
'common/extensions/command.cc',
'common/extensions/command.h',
'common/extensions/extension_constants.cc',
'common/extensions/extension_constants.h',
'common/extensions/extension_file_util.cc',
'common/extensions/extension_file_util.h',
'common/extensions/extension_process_policy.cc',
'common/extensions/extension_process_policy.h',
'common/extensions/features/chrome_channel_feature_filter.cc',
......@@ -85,28 +69,6 @@
'common/extensions/features/feature_channel.h',
'common/extensions/image_writer/image_writer_util_mac.cc',
'common/extensions/image_writer/image_writer_util_mac.h',
'common/extensions/manifest_handlers/app_isolation_info.cc',
'common/extensions/manifest_handlers/app_isolation_info.h',
'common/extensions/manifest_handlers/app_launch_info.cc',
'common/extensions/manifest_handlers/app_launch_info.h',
'common/extensions/manifest_handlers/automation.h',
'common/extensions/manifest_handlers/automation.cc',
'common/extensions/manifest_handlers/content_scripts_handler.cc',
'common/extensions/manifest_handlers/content_scripts_handler.h',
'common/extensions/manifest_handlers/mime_types_handler.cc',
'common/extensions/manifest_handlers/mime_types_handler.h',
'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
'common/extensions/manifest_handlers/settings_overrides_handler.cc',
'common/extensions/manifest_handlers/settings_overrides_handler.h',
'common/extensions/manifest_handlers/synthesize_browser_action_handler.cc',
'common/extensions/manifest_handlers/synthesize_browser_action_handler.h',
'common/extensions/manifest_handlers/theme_handler.cc',
'common/extensions/manifest_handlers/theme_handler.h',
'common/extensions/manifest_handlers/ui_overrides_handler.cc',
'common/extensions/manifest_handlers/ui_overrides_handler.h',
'common/extensions/manifest_url_handler.cc',
'common/extensions/manifest_url_handler.h',
'common/extensions/permissions/chrome_api_permissions.cc',
'common/extensions/permissions/chrome_api_permissions.h',
'common/extensions/permissions/chrome_permission_message_provider.cc',
......@@ -188,28 +150,66 @@
'chrome_common_extensions_sources': [
'common/extensions/api/commands/commands_handler.cc',
'common/extensions/api/commands/commands_handler.h',
'common/extensions/api/extension_action/action_info.cc',
'common/extensions/api/extension_action/action_info.h',
'common/extensions/api/extension_action/browser_action_handler.cc',
'common/extensions/api/extension_action/browser_action_handler.h',
'common/extensions/api/extension_action/page_action_handler.cc',
'common/extensions/api/extension_action/page_action_handler.h',
'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
'common/extensions/api/file_browser_handlers/file_browser_handler.h',
'common/extensions/api/i18n/default_locale_handler.cc',
'common/extensions/api/i18n/default_locale_handler.h',
'common/extensions/api/identity/oauth2_manifest_handler.cc',
'common/extensions/api/identity/oauth2_manifest_handler.h',
'common/extensions/api/input_ime/input_components_handler.cc',
'common/extensions/api/input_ime/input_components_handler.h',
'common/extensions/api/notifications/notification_style.cc',
'common/extensions/api/notifications/notification_style.h',
'common/extensions/api/omnibox/omnibox_handler.cc',
'common/extensions/api/omnibox/omnibox_handler.h',
'common/extensions/api/plugins/plugins_handler.cc',
'common/extensions/api/plugins/plugins_handler.h',
'common/extensions/api/speech/tts_engine_manifest_handler.cc',
'common/extensions/api/speech/tts_engine_manifest_handler.h',
'common/extensions/api/spellcheck/spellcheck_handler.cc',
'common/extensions/api/spellcheck/spellcheck_handler.h',
'common/extensions/api/storage/storage_schema_manifest_handler.cc',
'common/extensions/api/storage/storage_schema_manifest_handler.h',
'common/extensions/api/supervised_user_private/supervised_user_handler.cc',
'common/extensions/api/supervised_user_private/supervised_user_handler.h',
'common/extensions/api/system_indicator/system_indicator_handler.cc',
'common/extensions/api/system_indicator/system_indicator_handler.h',
'common/extensions/api/url_handlers/url_handlers_parser.cc',
'common/extensions/api/url_handlers/url_handlers_parser.h',
'common/extensions/api/webstore/webstore_api_constants.cc',
'common/extensions/api/webstore/webstore_api_constants.h',
'common/extensions/chrome_manifest_handlers.cc',
'common/extensions/chrome_manifest_handlers.h',
'common/extensions/extension_file_util.cc',
'common/extensions/extension_file_util.h',
'common/extensions/manifest_handlers/app_isolation_info.cc',
'common/extensions/manifest_handlers/app_isolation_info.h',
'common/extensions/manifest_handlers/app_launch_info.cc',
'common/extensions/manifest_handlers/app_launch_info.h',
'common/extensions/manifest_handlers/automation.cc',
'common/extensions/manifest_handlers/automation.h',
'common/extensions/manifest_handlers/content_scripts_handler.cc',
'common/extensions/manifest_handlers/content_scripts_handler.h',
'common/extensions/manifest_handlers/mime_types_handler.cc',
'common/extensions/manifest_handlers/mime_types_handler.h',
'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
'common/extensions/manifest_handlers/settings_overrides_handler.cc',
'common/extensions/manifest_handlers/settings_overrides_handler.h',
'common/extensions/manifest_handlers/synthesize_browser_action_handler.cc',
'common/extensions/manifest_handlers/synthesize_browser_action_handler.h',
'common/extensions/manifest_handlers/theme_handler.cc',
'common/extensions/manifest_handlers/theme_handler.h',
'common/extensions/manifest_handlers/ui_overrides_handler.cc',
'common/extensions/manifest_handlers/ui_overrides_handler.h',
'common/extensions/manifest_url_handler.cc',
'common/extensions/manifest_url_handler.h',
],
'chrome_common_full_safe_browsing_sources': [
'common/safe_browsing/download_protection_util.cc',
......@@ -336,7 +336,12 @@
['enable_extensions==1', {
'sources': [ '<@(chrome_common_extensions_sources)' ],
'dependencies': [
'../device/usb/usb.gyp:device_usb',
'<(DEPTH)/device/usb/usb.gyp:device_usb',
'<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
'<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
],
'export_dependent_settings': [
'<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
],
}],
['OS=="win" or OS=="mac"', {
......@@ -353,7 +358,6 @@
}],
['OS != "ios"', {
'dependencies': [
'<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
'<(DEPTH)/components/components.gyp:autofill_core_common',
'<(DEPTH)/components/components.gyp:autofill_content_common',
'<(DEPTH)/components/components.gyp:password_manager_core_common',
......@@ -361,15 +365,11 @@
'<(DEPTH)/components/components.gyp:signin_core_common',
'<(DEPTH)/components/components.gyp:translate_content_common',
'<(DEPTH)/components/components.gyp:visitedlink_common',
'<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
'<(DEPTH)/extensions/extensions.gyp:extensions_common',
'<(DEPTH)/ipc/ipc.gyp:ipc',
'<(DEPTH)/third_party/re2/re2.gyp:re2',
'<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
],
'export_dependent_settings': [
'<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
],
}, { # OS == ios
'sources/': [
['exclude', '^common/child_process_'],
......
......@@ -344,6 +344,9 @@
['enable_extensions==1', {
'dependencies': [
'../extensions/extensions.gyp:extensions_renderer',
# TODO(hclam): See crbug.com/298380 for details.
# We should isolate the APIs needed by the renderer.
'<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
],
'sources': [
'<@(chrome_renderer_extensions_sources)',
......@@ -409,13 +412,6 @@
}],
],
}],
['OS != "ios"', {
'dependencies': [
# TODO(hclam): See crbug.com/298380 for details.
# We should isolate the APIs needed by the renderer.
'<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
],
}],
],
},
],
......
......@@ -1660,7 +1660,6 @@
'conditions': [
['OS!="ios"', {
'dependencies': [
'common/extensions/api/api.gyp:chrome_api',
'plugin',
'renderer',
'utility',
......@@ -1672,7 +1671,6 @@
'../components/components.gyp:autofill_core_test_support',
'../components/components.gyp:captive_portal_test_support',
'../components/components.gyp:sessions_test_support',
'../extensions/extensions.gyp:extensions_test_support',
'../google_apis/google_apis.gyp:google_apis_test_support',
'../ipc/ipc.gyp:test_support_ipc',
'../media/media.gyp:media_test_support',
......@@ -1786,6 +1784,8 @@
['enable_extensions==1', {
'dependencies': [
'../components/components.gyp:storage_monitor_test_support',
'../extensions/extensions.gyp:extensions_test_support',
'common/extensions/api/api.gyp:chrome_api',
],
'sources': [
'browser/drive/dummy_drive_service.cc',
......@@ -1965,14 +1965,11 @@
'conditions': [
['OS!="ios"', {
'dependencies': [
'common/extensions/api/api.gyp:chrome_api',
'../components/components.gyp:autofill_content_test_support',
'../components/components.gyp:component_metrics_proto',
'../components/components.gyp:data_reduction_proxy_test_support',
'../components/components_strings.gyp:components_strings',
'../content/app/resources/content_resources.gyp:content_resources',
'../extensions/extensions_resources.gyp:extensions_resources',
'../extensions/extensions_strings.gyp:extensions_strings',
'../gpu/gpu.gyp:gpu_unittest_utils',
'../media/media.gyp:media_test_support',
'../ppapi/ppapi_internal.gyp:ppapi_unittest_shared',
......@@ -2057,11 +2054,7 @@
['exclude', '^browser/extensions/'],
['exclude', '^browser/sync/glue/extensions_activity_monitor_unittest.cc'],
['exclude', '^browser/sync_file_system/'],
['exclude', '^common/extensions/api/'],
['exclude', '^common/extensions/manifest_handlers/'],
['exclude', '^common/extensions/manifest_tests/'],
# This test depends on manifest_tests.
['exclude', '^common/extensions/permissions/settings_override_permission_unittest.cc'],
['exclude', '^common/extensions/'],
['exclude', '^utility/extensions/'],
['exclude', '^utility/image_writer/'],
['exclude', '^utility/media_galleries/'],
......@@ -2094,6 +2087,12 @@
'renderer/extensions/extension_localization_peer_unittest.cc',
'renderer/extensions/renderer_permissions_policy_delegate_unittest.cc',
],
}, { # enable_extensions==1
'dependencies': [
'common/extensions/api/api.gyp:chrome_api',
'../extensions/extensions_resources.gyp:extensions_resources',
'../extensions/extensions_strings.gyp:extensions_strings',
],
}],
['use_ash==1', {
'sources': [
......
......@@ -81,7 +81,6 @@ static_library("common") {
} else {
# Non-iOS.
deps += [
"//chrome/common/extensions/api",
"//components/visitedlink/common",
"//components/autofill/content/common",
"//components/autofill/core/common",
......@@ -100,8 +99,9 @@ static_library("common") {
gypi_values.chrome_common_extensions_sources,
".", "//chrome")
deps += [
"//device/bluetooth",
"//device/bluetooth", # TODO(thestig) Still needed? Not in gyp version.
"//device/usb",
"//chrome/common/extensions/api",
"//extensions/common",
"//extensions/common/api",
"//extensions/strings",
......
......@@ -11,23 +11,17 @@ gypi_values = exec_script(
[ "schemas.gypi" ])
# Common sources that are both bundled and compiled.
if (is_android) {
# Should be eliminated. See crbug.com/305852.
sources = gypi_values.android_schema_files
} else {
sources = gypi_values.main_schema_files
if (is_chromeos) {
sources += gypi_values.chromeos_schema_files
}
if (enable_webrtc) {
sources += gypi_values.webrtc_schema_files
}
sources = gypi_values.main_schema_files
if (is_chromeos) {
sources += gypi_values.chromeos_schema_files
}
if (!is_android) {
uncompiled_sources = gypi_values.main_non_compiled_schema_files
if (enable_webrtc) {
sources += gypi_values.webrtc_schema_files
}
uncompiled_sources = gypi_values.main_non_compiled_schema_files
root_namespace = "extensions::api::%(namespace)s"
schema_include_rules =
"extensions/common/api:extensions::core_api::%(namespace)s"
......
......@@ -7,13 +7,6 @@
'<@(schema_files)',
],
'variables': {
# These duplicate other lists and are the only ones used on Android. They
# should be eliminated. See crbug.com/305852.
'android_schema_files': [
'manifest_types.json',
],
# These are used everywhere except Android.
'main_schema_files': [
'accessibility_private.json',
'activity_log_private.json',
......@@ -142,6 +135,9 @@
# Disable schema compiler to generate model extension API code.
# Only register the extension functions in extension system.
'conditions': [
# TODO(thestig): Remove this file from non-extensions build so the
# conditional and else branch goes away.
# Do the same for chrome/common/extensions/api/schemas.gni.
['enable_extensions==1', {
'non_compiled_schema_files': [
'<@(main_non_compiled_schema_files)',
......@@ -161,8 +157,6 @@
'schema_dependencies': [
],
'schema_files': [
# These should be eliminated. See crbug.com/305852.
'<@(android_schema_files)',
],
}],
['chromeos==1', {
......
......@@ -8,7 +8,6 @@
#include "base/strings/string_util.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/extensions/api/generated_schemas.h"
#include "chrome/common/extensions/chrome_manifest_handlers.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/features/chrome_channel_feature_filter.h"
......@@ -18,7 +17,6 @@
#include "chrome/grit/common_resources.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/api/generated_schemas.h"
#include "extensions/common/common_manifest_handlers.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_api.h"
......@@ -41,8 +39,12 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
// TODO(thestig): Remove these #defines. This file should not be built when
// extensions are disabled.
#if defined(ENABLE_EXTENSIONS)
#include "chrome/common/extensions/api/generated_schemas.h"
#include "chrome/grit/extensions_api_resources.h"
#include "extensions/common/api/generated_schemas.h"
#endif
namespace extensions {
......@@ -83,7 +85,9 @@ void ChromeExtensionsClient::Initialize() {
// thread runs in-process.
if (!ManifestHandler::IsRegistrationFinalized()) {
RegisterCommonManifestHandlers();
#if defined(ENABLE_EXTENSIONS)
RegisterChromeManifestHandlers();
#endif
ManifestHandler::FinalizeRegistration();
}
......@@ -230,18 +234,26 @@ bool ChromeExtensionsClient::IsScriptableURL(
bool ChromeExtensionsClient::IsAPISchemaGenerated(
const std::string& name) const {
#if defined(ENABLE_EXTENSIONS)
// Test from most common to least common.
return api::GeneratedSchemas::IsGenerated(name) ||
core_api::GeneratedSchemas::IsGenerated(name);
#else
return false;
#endif
}
base::StringPiece ChromeExtensionsClient::GetAPISchema(
const std::string& name) const {
#if defined(ENABLE_EXTENSIONS)
// Test from most common to least common.
if (api::GeneratedSchemas::IsGenerated(name))
return api::GeneratedSchemas::Get(name);
return core_api::GeneratedSchemas::Get(name);
#else
return base::StringPiece();
#endif
}
void ChromeExtensionsClient::RegisterAPISchemaResources(
......
......@@ -107,6 +107,9 @@ static_library("renderer") {
sources += rebase_path(gypi_values.chrome_renderer_extensions_sources,
".", "..")
deps += [
# TODO(hclam): See crbug.com/298380 for details.
# We should isolate the APIs needed by the renderer.
"//chrome/common/extensions/api",
"//extensions:extensions_resources",
"//extensions/renderer",
]
......@@ -148,13 +151,6 @@ static_library("renderer") {
sources += rebase_path(gypi_values.chrome_renderer_non_android_sources,
".", "..")
}
if (!is_ios) {
deps += [
# TODO(hclam): See crbug.com/298380 for details.
# We should isolate the APIs needed by the renderer.
"//chrome/common/extensions/api",
]
}
# TODO(GYP)
# 'sources': [
......
......@@ -200,7 +200,6 @@ source_set("common") {
"//components/url_matcher",
"//content/public/common",
"//crypto",
"//extensions/common/api",
"//extensions/strings",
"//ipc",
"//net",
......@@ -221,6 +220,7 @@ source_set("common") {
deps += [
"//device/bluetooth",
"//device/usb",
"//extensions/common/api",
]
} else {
sources -= [
......
......@@ -8,10 +8,6 @@ gypi_values = exec_script(
"scope",
[ "schemas.gypi" ])
if (is_android) {
sources = gypi_values.android_schema_files
} else {
sources = gypi_values.main_schema_files
}
sources = gypi_values.main_schema_files
root_namespace = "extensions::core_api::%(namespace)s"
......@@ -8,10 +8,6 @@
],
'variables': {
'chromium_code': 1,
# TODO: Eliminate these on Android. See crbug.com/305852.
'android_schema_files': [
'runtime.json',
],
'main_schema_files': [
'app_current_window_internal.idl',
'app_runtime.idl',
......@@ -50,6 +46,9 @@
],
'non_compiled_schema_files': [
],
# TODO(thestig) Do not include this file in non-extensions builds.
# Then the conditional and else block can go away.
# Do the same for extensions/common/api/schemas.gni.
'conditions': [
['enable_extensions==1', {
'schema_files': [
......@@ -57,7 +56,6 @@
],
}, {
'schema_files': [
'<@(android_schema_files)',
],
}],
],
......
......@@ -28,7 +28,6 @@
'../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
'../url/url.gyp:url_lib',
'../third_party/libxml/libxml.gyp:libxml',
'common/api/api.gyp:extensions_api',
'extensions_strings.gyp:extensions_strings',
],
'include_dirs': [
......@@ -225,6 +224,7 @@
'conditions': [
['enable_extensions==1', {
'dependencies': [
'common/api/api.gyp:extensions_api',
'../device/bluetooth/bluetooth.gyp:device_bluetooth',
# For Mojo generated headers for generated_api.cc.
'../device/serial/serial.gyp:device_serial_mojo',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment